Should I use redux-form store instead of component state and Redux custom store?

后端 未结 4 885
谎友^
谎友^ 2021-01-30 18:58

I believe in any application there should be one source of truth.


My app will be having

  • 90+ transaction forms and 150 reports
  • Complex data s
4条回答
  •  感情败类
    2021-01-30 19:29

    I would recommend using Redux-Form only for collection and validation of data. Utilize your own component state and/or custom redux store if and when appropriate.

    You're correct in only using redux for state that is to be shared. Keep things simple and reusable.

    Good reading:

    https://goshakkk.name/should-i-put-form-state-into-redux/

    https://hackernoon.com/using-forms-in-react-redux-tips-and-tricks-48ad9c7522f6

    https://medium.com/dailyjs/why-build-your-forms-with-redux-form-bcacbedc9e8

提交回复
热议问题