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
0
votes
0 answers

Flux - How to create store for form fields? How to handle form field state? More than 500 form fields. fields value update gets slow

I am trying to create form using React Flux. Steps Rest api to get form fields Information In componentdidupdate i call action to update form fields information into store Form gets rerender fine I pass action to form fields when form fields…
Vimalesan
  • 165
  • 2
  • 2
  • 9
0
votes
1 answer

React + Flux: Action triggers synchronous ajax requests

I am building a survey style app using React + Flux. When a user submits an answer I fire off an action that triggers an ajax request to save the answer in the database (ajax request #1). I then need to do an ajax request to get the next question…
Nathan
  • 869
  • 2
  • 8
  • 7
0
votes
1 answer

React + Flux - Binding nested components with inputs to a single "model"

Coming from Angular, understanding scopes and how the directives/controllers interact with the HTML seem fairly logical compared with this simple example I'm trying to do. Essentially, I have a few components. /** @jsx React.DOM */ var React =…
sambomartin
  • 6,663
  • 7
  • 40
  • 64
0
votes
0 answers

ReactJS location: Router.HistoryLocation works fine locally but not on Heroku

I have a Phoenix (Elixir) and ReactJS app, and was able to remove the /#/ in the URL locally by turning on "location: Router.HistoryLocation" in router_store.js. However, when I uploaded the code to Heroku and rebooted the droplets, it doesn't…
0
votes
1 answer

Should action creator trigger another action?

For example, I am going to implement a "Like post" feature. After the post is liked, then I need to get the latest like count (another action). From the following code, should I call get(postId) immediately to trigger another action or should store…
Franz Wong
  • 1,024
  • 1
  • 10
  • 32
0
votes
1 answer

Using one store for multiple elements of the same type

Let's say I have two controller-views - ItemsContainer, Item and a store ItemsStore, which stores items list. When items list changes because of some action, store emits change, and both views get their state from ItemsStore. ItemsContainer calls…
user3445165
  • 45
  • 1
  • 6
0
votes
1 answer

Server-side React with pure components

I am trying to build an isomorphic React app that adheres to best practices. I am currently only trying to find a good system for the server. Here are some of my requirements: Requirements I want to use react-router I am trying to avoid a…
Macks
  • 1,696
  • 5
  • 23
  • 38
0
votes
1 answer

Getting undefined for this.props.data

I keep getting undefined for this.props.data when I have passed it from by setting this.state this.props.data from last component. Here is the jobOffer component which properly passes data and render: const JobOffer = React.createClass({ mixins:…
rahul2001
  • 1,577
  • 2
  • 17
  • 32
0
votes
1 answer

How to handle with stateful DOM elements with Flux

I'm working on building a React media player component that wraps an HTML5
Collin Allen
  • 4,449
  • 3
  • 37
  • 52
0
votes
1 answer

React JS widget inside reactjs app, causing --- Invariant Violation: ReactMount: Two valid but unequal nodes with the same `data-reactid

I have a parent ReactJS application, also I have placeholder for reactjs widget from another application. This causes Invariant Violation: ReactMount: Two valid but unequal nodes with the same `data-reactid' . How do i fix this? Is there way to set…
codeguy
  • 51
  • 1
  • 1
  • 6
0
votes
0 answers

How to render react components on server and client completely?

I need to make ES6+ isomorphic javascript app, which can render full page with data on server at first request (or w/o js on client) and navigate with client-side rendering. There is two modules, which could make asynchronus rendering - react-async…
br.
  • 1,259
  • 1
  • 14
  • 21
0
votes
1 answer

In React's Flux how to use a store, when two components need different data from the store at the same time?

I have a store (MovieStore) which I would like to use as a central store to movies in my React App. I have a search page, that lists the movies based on a search string (and uses of course the MovieStore). In addition I have a typeahead component,…
gsanta
  • 754
  • 6
  • 21
0
votes
1 answer

Issues changing App state with react router

I am trying to go to User view/state after they have logged in and authenticated but can't seem to get react router to do it. The initial state of the App is just a static nav-bar with views that route properly, but when the user logs in or…
rahul2001
  • 1,577
  • 2
  • 17
  • 32
0
votes
1 answer

How do you do web routes in React and React Router?

I have all my /api routes that require auth going through node but I want to also expose and have web routes that I can do in react and decouple from the server. Is there a way to have react (or react router) handle web routes?
rahul2001
  • 1,577
  • 2
  • 17
  • 32
0
votes
1 answer

react js fetching data from server and render

I'm using React js and the Biff Flux implementation. I have a question on the best way of achieving load from server. getInitialState: function(){ return{ loading: true }; }, componentDidMount: function(){ …
Edgesoft
  • 282
  • 2
  • 16