Why use Redux over Facebook Flux?
First of all, it is totally possible to write apps with React without
Flux.
First of all, it is totally possible to write apps with React without
Flux.
I’m creating a react.js application with flux architecture and I am trying figure out where and when a request for data from the server should be made. Is there a any example for this. (Not TODO app!)
I use axios
for ajax requests and reactJS
+ flux
for render UI. In my app there is third side timeline (reactJS component). Timeline can be managed by mouse’s scroll. App sends ajax request for the actual data after any scroll event. Problem that processing of request at server can be more slow than next scroll event. In this case app can have several (2-3 usually) requests that already is deprecated because user scrolls further. it is a problem because every time at receiving of new data timeline begins redraw. (Because it’s reactJS + flux) Because of this, the user sees the movement of the timeline back and forth several times. The easiest way to solve this problem, it just abort previous ajax request as in jQuery
. For example:
Should the stores maintain their own state and have the ability to call network and data storage services in doing so …in which case the actions are just dumb message passers,
Here is my form and the onClick method. I would like to execute this method when the Enter button of keyboard is pressed. How ?
Is it possible to pass an object via Link
component in react-router?
Here is the code in actions.js
I’m rewriting my app to use Flux and I have an issue with retrieving data from Stores. I have a lot of components, and they nest a lot. Some of them are large (Article
), some are small and simple (UserAvatar
, UserLink
).
I wanted to build a Facebook login into my react/react-router/flux application.
I have a listener registered on the login event and would like to redirect the user to '/dashboard'
if they are logged in. How can I do that? location.push
didn’t work very well, except after reloading the page completely.
In the Facebook talk on the Flux architecture, Jing mentions at 12:17 that the dispatcher enforces that no actions can be dispatched until the current action is fully processed by the stores.