If I use Apollo, do I need redux still since it us...
# prisma-whats-new
f
If I use Apollo, do I need redux still since it uses redux already?
w
@fourcolors no, it uses redux internally to manage a client-side cache
f
How do I handle actions that don’t needs to send anything to graph.cool ?
w
you can choose a different state management technology like mobx, and treat the apollo client's redux implementation as a black box if you want (thats what I do for the most part)
f
@wallsid
oops.
w
what kind of actions are you referring to?
f
For instance, something like redux-forms is nice to help manage the state of my forms before I submit them with client side validations.
Another case would my navigation in react native
w
you can use redux if you want, it's up to you. Apollo's use of redux doesn't force you to use it is all
f
right, so I guess my real question is, do I need to install redux and use it or if I have apollo installed, can I somehow use apollo’s redux?
I guess that’s where I got confused
Ok, I’ll see how far I can get with just Apollo and add Redux if it get’s crazy
w
basically, you can choose two options
have your own independent redux state in your app, that only integrates with apollo via the props that apollo is passing down into your components
or you can choose to integrate apollo into your redux state, and use the internal messages that are being called in apollo to affect your app state
I've used redux before, but not with apollo. and I'm using apollo in my current project, but not with redux (i'm using mobx). So I my experience is closer to the first option, where the results of graphql queries basically end up as props that are passed into my components
and I don't worry about the internals of apollo so much
f
ah, right. I think I might be more compforable with the second option.
That makes sense
p
@fourcolors Have you seen this? http://dev.apollodata.com/react/redux.html