This is a demo project for implementation of:
- default react native boilerplate app (using react-native init).
- Add redux and redux-toolkit (toolkit is recommnded as per documentation and it really eases the development)
- Implemented a simple counter & a copy with redux.
- Add redux-persist to persist the latest store across user sessions.
- Main purpose being I didn't find many articles or sources explaining above.
- Learn how to implement redux-persist over redux-toolkit.
- npx react-native init ReduxPersist
- cd ReduxPersist
- OPTIONAL: Changes done for changes port in "/package.json > scripts". In my case, port 8081 was already in use so, I use 9001. You can skip port changes.
-
paper (https://callstack.github.io/react-native-paper/)
- npm install react-native-paper react-native-vector-icons This is totally an optional dependency. I am used to adding an UI library to any project for ease of development. Also, to note, react native paper is perfect for you if you are looking for a component library following Material design.
-
redux (https://react-redux.js.org/ and https://redux-toolkit.js.org/)
- npm install redux @reduxjs/toolkit react-redux
-
redux-persist (https://github.com/rt2zz/redux-persist)
- npm install redux-persist
-
async-storage (https://react-native-async-storage.github.io/async-storage/docs/install/ and https://github.com/react-native-async-storage/async-storage)
- npm install @react-native-async-storage/async-storage
VOILA! You can buy me a coffee! https://www.buymeacoffee.com/saurabhshah23