cypress-example-todomvc-redux icon indicating copy to clipboard operation
cypress-example-todomvc-redux copied to clipboard

Migrate to Redux Toolkit

Open leosuncin opened this issue 5 years ago • 1 comments

Redux toolkit is the new recommended way to work with Redux and because this is example followed by devs that use Cypress I think it would be a good idea to update the code to use it. RTK allows to write less and improve readability of code.

Thing I done:

  • Switch to slice pattern, no need to define action/reducer/selectors in separate files
  • Still use reselect's selectors
  • Update test files when needed
  • Keep the same code coverage
  • Format code with prettier (--no-semi --single-quote)

Pending ones

  • [x] ~Use Redux's hooks API instead of connect/map~ Require react-redux >= v7.1
  • [x] Convert class components to functional components, use hooks API

leosuncin avatar Aug 28 '20 04:08 leosuncin

Optional:

  • ~Use React Testing Library for unit test, but I didn't see jest as dependency~ Remove old tests
  • [ ] Upgrade React Redux to v7 and use Hook API over connect

leosuncin avatar Aug 28 '20 04:08 leosuncin