Skip to main content
Added an example
Source Link
David C
  • 121
  • 3

I've only started working with React/Redux myself, but here are my thoughts.

  1. In my system I am saving the form values to local component state until the form is saved. I have one onChange handler method which checks which form field it is and then will setState.

  2. This is something I also find with React/Redux - a lot of boilerplate and repetition to update a few pieces of data... Similar to yourself I have the Action Types / Action Creators / API Calls / Reducers / Component methods all with very similar names. I think that is just the way it is. I'm also looking to include redux-saga in our code so that potentially means even more of the same named methods.

  3. I use parsley for form validating, so that code is handled by the library. If I really needed to do further checking, I would do it in the onChange before changing the local component state.

  4. You have everything in one component at the moment for listing the recipes and adding the recipes. I would split them into separate components and then once you're finished with saving a new recipe, render the list again. Your app is very much like a To Do list app, have a look for examples of that.

If it wasn't for the speed of react-redux, I probably wouldn't be bothered with it!

Here's an example of a to do app that has a similar structure to my own app (which I hope is well structured lol). https://github.com/reactjs/redux/tree/master/examples/todomvc

I've only started working with React/Redux myself, but here are my thoughts.

  1. In my system I am saving the form values to local component state until the form is saved. I have one onChange handler method which checks which form field it is and then will setState.

  2. This is something I also find with React/Redux - a lot of boilerplate and repetition to update a few pieces of data... Similar to yourself I have the Action Types / Action Creators / API Calls / Reducers / Component methods all with very similar names. I think that is just the way it is. I'm also looking to include redux-saga in our code so that potentially means even more of the same named methods.

  3. I use parsley for form validating, so that code is handled by the library. If I really needed to do further checking, I would do it in the onChange before changing the local component state.

  4. You have everything in one component at the moment for listing the recipes and adding the recipes. I would split them into separate components and then once you're finished with saving a new recipe, render the list again. Your app is very much like a To Do list app, have a look for examples of that.

If it wasn't for the speed of react-redux, I probably wouldn't be bothered with it!

I've only started working with React/Redux myself, but here are my thoughts.

  1. In my system I am saving the form values to local component state until the form is saved. I have one onChange handler method which checks which form field it is and then will setState.

  2. This is something I also find with React/Redux - a lot of boilerplate and repetition to update a few pieces of data... Similar to yourself I have the Action Types / Action Creators / API Calls / Reducers / Component methods all with very similar names. I think that is just the way it is. I'm also looking to include redux-saga in our code so that potentially means even more of the same named methods.

  3. I use parsley for form validating, so that code is handled by the library. If I really needed to do further checking, I would do it in the onChange before changing the local component state.

  4. You have everything in one component at the moment for listing the recipes and adding the recipes. I would split them into separate components and then once you're finished with saving a new recipe, render the list again. Your app is very much like a To Do list app, have a look for examples of that.

If it wasn't for the speed of react-redux, I probably wouldn't be bothered with it!

Here's an example of a to do app that has a similar structure to my own app (which I hope is well structured lol). https://github.com/reactjs/redux/tree/master/examples/todomvc

Source Link
David C
  • 121
  • 3

I've only started working with React/Redux myself, but here are my thoughts.

  1. In my system I am saving the form values to local component state until the form is saved. I have one onChange handler method which checks which form field it is and then will setState.

  2. This is something I also find with React/Redux - a lot of boilerplate and repetition to update a few pieces of data... Similar to yourself I have the Action Types / Action Creators / API Calls / Reducers / Component methods all with very similar names. I think that is just the way it is. I'm also looking to include redux-saga in our code so that potentially means even more of the same named methods.

  3. I use parsley for form validating, so that code is handled by the library. If I really needed to do further checking, I would do it in the onChange before changing the local component state.

  4. You have everything in one component at the moment for listing the recipes and adding the recipes. I would split them into separate components and then once you're finished with saving a new recipe, render the list again. Your app is very much like a To Do list app, have a look for examples of that.

If it wasn't for the speed of react-redux, I probably wouldn't be bothered with it!