Reputation: 503
Are Relay and Redux alternatives to each other? When are they best used with? Can we use Relay, GraphQL with Redux?
Upvotes: 2
Views: 1194
Reputation: 8114
REDUX:
redux-thunk
/ redux-saga
to call apis. On Response of API's you update your state.Now if you see in redux
there is a lot of boilerplate code.
I personally find redux really cool and handy but you need to take care of following:-
RELAY:
Relay is really really powerful and provides following benefits:-
Relay is really really powerful but you there is bit of overhead when you get started. Following are the pre-requisites:-
Once you are done with prerequisites also understanding how relay actually works is bit tricky and not as easy as redux. But once you understand how it works and why was it brought into picture you would really be amazed. Its indeed a really powerful tool.
So in case of your project is small-medium sized I would say go with redux and if its on large scale relay. But if you are working on react-native do give relay a try , its really interesting.
Also,yes you can use redux with relay.
Upvotes: 8