Frequently asked questions from the community.
What are the drawbacks of using Fluxible? In contrast to Facebook's Flux library?
It depends on whether you are building a server-side app. Facebook’s Flux only works on the client, but it may be easier to figure out since it doesn’t have to deal with concurrency issues.
Is there a way to render a reactComponent only client side?
componentDidMount lifecycle event to set an internal state that re-renders itself on the client (i.e,
Can I fire the navigation function manually?
Yes, you can call the
navigate action from flux-router-component directly.
executeAction be required in the
It is not required because we still support passing
context as a prop to all of the components that need it. This is how things were done before we started using
context. Some people still prefer this method since React’s
context is not guaranteed to stay the way it is right now.
Can I call an action from a store?
Right now, it is not possible. This will require some thought on how to ensure that the server can keep track of actions that are executed from stores.
What does the error message "invalid csrf token" from Fetchr mean?
Which should I use,
react-router has some features that flux-router-component does not have, like nested routes, component
willTransitionTo hooks, and built-in re-directs. If you feel like you do not need them, then you will be fine with flux-router-component. We prefer the flux-like flow, so we use flux-router-component internally.
In react-router, how do I get access to the Fluxible context from
willTransitionTo is defined statically on the component, it will not have access to the Fluxible context. There is a open issue from react-router to provide access but, as of this writing) it has yet to be resolved.
Why does routing execution order change based on first load vs routing via
This is by design so that you could render loading states within your components while navigation is happening. Then you change the layout immediately and then fill sections of the page with data as it is loaded rather than having a wait followed by a full update.
With that said, you should be able to get the behavior you want by implementing
shouldComponentUpdate in your app component that returns false when
this.props.isNavigateComplete is false. This would prevent rendering until the full navigation has finished.