Questions tagged [reactjs-flux]

Flux is the application architecture that Facebook uses for building client-side web applications with React. It complements React's composable view components by utilizing a unidirectional data flow.

Flux is the application architecture that Facebook uses for building client-side web applications with React. It complements React's composable view components by utilizing a unidirectional data flow.

Flux applications have three major parts: the dispatcher(s), the store(s), and the view(s) (React components).

Flux eschews MVC in favor of a unidirectional data flow. When a user interacts with a React view, the view propagates an action through a central dispatcher, to the various stores that hold the application's data and business logic, which updates all of the views that are affected. This works especially well with React's declarative programming style, which allows the store to send updates without specifying how to transition views between states.

###Some popular implementations of Flux


Related tags

822 questions
5
votes
1 answer

Flux Dispatcher - View actions vs. Server Actions

Is there any reason, other than semantics, to create different dispatch methods for view and server actions? All tutorials and examples I’ve seen (most notably this) ignore the source constant entirely when listening to dispatched payloads in favor…
user413945
  • 1,141
  • 1
  • 7
  • 8
4
votes
2 answers

Redux: Is there any standard implementation or library for keeping track of the status of an async request?

In redux async actions in the docs the state of an async request is kept as a property isFetching in the state container for various objects: { selectedSubreddit: 'frontend', postsBySubreddit: { frontend: { isFetching: true, …
jcroll
  • 6,875
  • 9
  • 52
  • 66
4
votes
1 answer

How to save big array of objects in react native using react-native-db-model

storage.people.add_all(people_array, function(people_array){ console.log("people_array",people_array) }); people_array is about 1000 records and limit can exceed in future. This method is taking more than 5 minutes to save into the db so…
Waleed Arshad
  • 1,081
  • 3
  • 12
  • 24
4
votes
2 answers

React - mapping data to rows that are formed during a map function

I have a component called Cells which renders with data that is gotten from a flux store. My problem is that I want to render this data to a specific row but because of the way I am rendering the rows (they are dynamic so you can add them to the…
BeeNag
  • 1,764
  • 8
  • 25
  • 42
4
votes
1 answer

ReactCSSTransitionGroup with React 0.14 and pretty Invariant Violation: addComponentAsRefTo(...)

Well, I used to do some job in ReactJS with ES3 syntax. Now I'm trying my best with ES6 one but I can't simply use ReactCSSTransitionGroup, due to absolutely mad error that says Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can…
Shiroo
  • 666
  • 4
  • 11
4
votes
2 answers

What is a controller view in the Flux Architecture?

I see the term mentioned often for Flux architectures and React projects. From what I understand, it is a design pattern but I can't find a good description for it online.
bsky
  • 19,326
  • 49
  • 155
  • 270
4
votes
2 answers

Flux store emitting changes to specific react components rather than all components.

Struggling to find or come up with an elegant answer to this one: If I have multiple dynamic react components that are listening to one flux store to update their child components is it possible to emit changes to specific components rather than…
ChoclateLove
  • 672
  • 1
  • 6
  • 11
4
votes
0 answers

Flux and AutobahnJs

I am using flux with authobahn and I have concerns about my architecture. I have some components that gets their state by subscribing to pubsub topic. Currently I am using flux for my data fetching and my actions looks like this: // I have a global…
Yosi
  • 2,936
  • 7
  • 39
  • 64
4
votes
0 answers

Accessing React component wrapped in higher order component

I know there are similar questions but none of them have an answer which is puzzling cause the problem should affect a lot of people using component wrapping. Say I have a component wrapped in a wrapper like Spring from React-Motion. What is an…
konrad
  • 1,664
  • 2
  • 17
  • 36
4
votes
1 answer

need to get value of dropdown menu without using onChange callback - (material-ui reactjs)

i am using material UI dropdown component and trying to run a callback function only when user fills all the form and submits the form. On the call back function i intend to collect all the form field and generate url to call to api. My problem is…
rosnk
  • 1,068
  • 1
  • 14
  • 36
4
votes
1 answer

Flux/utils: How to access to props in the calculateState method?

In a container component, how can I get a state from a store in the calculateState static method based on this.props ?
Salah Eddine Taouririt
  • 24,925
  • 20
  • 60
  • 96
4
votes
2 answers

How to avoid React markup checksum warnings when rendering time

When leveraging isomorphic rendering for a React component that displays time, I occasionally run into an issue where the server renders time at point A, but by the time the client picks up as a SPA, the time from point A has changed to point B, and…
Collin Allen
  • 4,449
  • 3
  • 37
  • 52
4
votes
1 answer

how to add jquery-slider to the dependency list in browserify?

Description : I have package.json and bower.json for handling dependencies in my current schema. In which file should I add the "jquery.slider (version 1.1.0)" and how to do it?. Currently,I have added the dependency in bower.json like…
4
votes
1 answer

ReactJS: Child component updates before parent state is set

I have parent and child components where the state of the child (openWhen is essentially a shouldChildRender) is controlled by the parent. I'm running into an issue where the child is updated (receives props) before the parent state is updated after…
4
votes
3 answers

react-router and flux - clearing state while transition

I am using react-router with the flux architecture (facebook's flux implementation). Currently in my system I have route that says "chat/:topic". When the user is entering this component, I am creating a subscription (using action creation, on…
Yosi
  • 2,936
  • 7
  • 39
  • 64