Moving from Redux to Rematch involves very few steps.
1. Setup Rematch
init with Redux#
Imagine a simple app than increments a value in a redux store written in React.
Redux reducers are currently like this:
But now we'll move them to Rematch Models, create a new file called
Both snippets (Redux one and Rematch Model) are equivalent.
Now, add it to your
init() method and remove
redux-thunk because isn't required with Rematch:
Views probably will work out of the box, because we're compatible with
Enjoy your refactored code-base :)