Questions tagged [refluxjs]

A simple library for uni-directional dataflow application architecture inspired by ReactJS Flux

A simple library for uni-directional dataflow application architecture inspired by (available at https://github.com/reflux/refluxjs)

Similarities with Flux

Some concepts are still in Reflux in comparison with Flux:

  • There are actions
  • There are data stores
  • The data flow is unidirectional

Differences with Flux

Reflux has refactored Flux to be a bit more dynamic and be more Functional Reactive Programming (FRP) friendly:

  • The singleton dispatcher is removed in favor for letting every action act as dispatcher instead.
  • Because actions are listenable, the stores may listen to them. Stores don't need to have a big switch statements that does static type checking (of action types) with strings
  • Stores may listen to other stores, i.e. it is possible to create stores that can aggregate data further, similar to a map/reduce.
  • waitFor is replaced in favor to handle serial and parallel data flows:
    • Aggregate data stores (mentioned above) may listen to other stores in serial
    • Joins for joining listeners in parallel
  • Action creators are not needed because RefluxJS actions are functions that will pass on the payload they receive to anyone listening to them
191 questions
0
votes
1 answer

Reflux.js + React.js trigger result is wrong

I'm trying to create a dynamic NavBar with react and reflux fetch. This is my actions file: var Reflux = require('reflux'); var SubMenuActions = Reflux.createActions([ 'getSubItems' ]); module.exports = SubMenuActions; My store…
Juan Jose Ortiz
  • 47
  • 1
  • 1
  • 6
0
votes
2 answers

How do I guarantee the data (async) is ready when the user clicks on an option of an actionSheetIOS?

I am developing an IOS app using React Native and Reflux. When the user opens up a certain actionSheetIOS, I trigger an action which causes the store to make an async request. The store keeps the collection of all of instances of data returned and…
generalchaos
  • 88
  • 1
  • 1
  • 7
0
votes
1 answer

Languages translation using reactjs & reflux

I am new to reactJS, I am working on a web app to make it multilingual, so I am looking for any library which handles translation in ReactJS (similar to angular-translate). Any help would be appreciated!
powercoder23
  • 1,404
  • 1
  • 13
  • 22
0
votes
1 answer

What are some alternatives to componentDidMount for registering store listeners and invoking actions on route transition?

Say I have a user profile component being served by a react-router route. //RouteStrings is just an object which defines my constant string values
Hypaethral
  • 1,467
  • 16
  • 22
0
votes
1 answer

Reflux connect/trigger behavior change after upgrade

I recently upgraded Reflux from v0.3.0 to v0.4.1 When I first tested my code after the update, the only change I had to make was to add a key to my component's Reflux.connect call. However, I am experiencing some strange behavior: var SomeActions =…
Matthew Herbst
  • 29,477
  • 23
  • 85
  • 128
0
votes
3 answers

Grails Project with React/Flux

I am currently working on a project in which we are having a React/Flux UI being developed for us. I am being told that the UI code needs to be converted into GSPs and put into a Grails Project, to work with our backend. I feel like moving the UI…
0
votes
1 answer

How to pass application settings to store

In terms of clean react application design, I'm sure sure how to pass around application settings to modules which are not part of the component tree. E.g. I connect to a REST API and therefore need to propagate the hostname to the components, but…
schneck
  • 10,556
  • 11
  • 49
  • 74
0
votes
2 answers

How can I change the reflux listenTo mixin based on a prop in a react.js component

Can anyone help with this... I have this list component and I want to be able to switch different data stores (defined in props) mixins:[Reflux.listenTo(RecentPupilsStore, 'onChange')], But I want to do this -…
rob_was_taken
  • 384
  • 4
  • 14
0
votes
0 answers

Flux Handling Action State

When i am correct in flux there are 2 different kinds of state Application State (in Stores) View State (in the Component) i am trying to build a CRUD application using flux and don't understand what's the smartest way to deal with action…
timg
  • 501
  • 2
  • 4
  • 13
0
votes
0 answers

Component state not updating from trigger

I'm trying to update the state data in my page component, the callbacks are firing and the correct data is going into each page but the edited value doesn't show in my table component, it shows in the editable input but not in my table cell, the…
Bomber
  • 10,195
  • 24
  • 90
  • 167
0
votes
1 answer

Action that fires after store has been changed

I have following Store and Actions const AliceStore = Reflux.createStore({ update() { var aliceNewValue = ... this.trigger(aliceNewValue); } }); const BobActions = Reflux.createActions(['notifyBob']); and now I want to fire…
WojciechKo
  • 1,511
  • 18
  • 35
0
votes
0 answers

Uncaught TypeError: Reflux.listenTo is not a function

My code looks like this: mixins: [Reflux.listenTo(ItemStore,"onChange")], .... onChange: function(items) { this.setState({items: items}); }, when I run npm start and on browser when I look into console, the error refers to the "mixins" line.…
jayasth
  • 163
  • 1
  • 2
  • 6
0
votes
1 answer

Reactjs component calling flux/reflux store directly (bad practice?)

I have a SessionStore where as you might guess, I store and handle the firebase session object. I have a component where it would be easy to ask if session has been created directly to the store (not firing an action), but I'm no sure this is an…
Franco
  • 11,845
  • 7
  • 27
  • 33
0
votes
1 answer

How do I make my store private in React reflux

How do I enforce my store functions and model private. If my store is var employeeActions = Reflux.createActions(['addEmployee']); var empStore = Reflux.createstore({ listenables: [employeeActions], model: { Total:0, …
anivas
  • 6,437
  • 6
  • 37
  • 45
0
votes
1 answer

React/Reflux data flow: One component twice in DOM

Suppose I have the following Tree: The component we care about is the…
mr-
  • 220
  • 2
  • 5