Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is redux-form worth using in an apollo-react-redux app?

I understand that redux-form handles reducers and actions for me which is a plus. But as far as I can tell the data will be returned as JSON upon submission and the added complexity to my app may not be worth while. The redux-form workflow seems to be counter intuitive to the apollo graphQL wrapper that takes a mutation function prop and a gql tag in the react work-flow. Is redux-form the wrong tool for the job or is there some insight I am missing? I would like to hear about any alternative tools others are using in react-apollo. -Thanks

like image 483
Joseph Barnes Avatar asked Mar 15 '17 18:03

Joseph Barnes


1 Answers

I stand corrected. Redux-form is worth using in Apollo-React-Redux.

After some research I found a minimumly invasive way to implement redux-form into an Apollo-React app if anyone is interested:

https://github.com/jferrettiboke/react-auth-app-example/blob/master/client/src/containers/SignInFormContainer.js

It took 2 lines in my index.js to include the formReducer (as expected) and sampling his signin form and its container.

His containerized method actually matched up well with the usual react- apollo work flow.

Thanks

like image 76
Joseph Barnes Avatar answered Sep 20 '22 02:09

Joseph Barnes