Search code examples
react-nativereduxreact-reduxfluxrelay

How do "flux" and "redux" relate to "react native" and which of these should a new "react native" start using?


How do "flux" and "redux" and "relay" relate to "react native" and which of these (flux and/or redux and/or relay) do most "react native" developers use.

Background: For someone starting up with "react native" which of these (i.e. flux, redux, relay) should they start aiming to utilise from day 1?


Solution

  • All three of them handles the state of your application they only differ on the complexity of setting them up. Relay is more complex I think, compare to flux and redux and when using relay you should be well aware of how GraphQL works.

    You actually don't need to use any of this if your application is small. I would suggest getting your self comfortable with handling states on your component, then proceed on using one of this tools. (I personally use redux) setting up is cumbersome for new users but it pays off. I would also suggest checking out Mobx.