Fernando Amezcua put together this tutorial how to implement React Hooks creating the example project. React Hooks, TypeScript and Redux for React Native, and author is going to add testing for React Native.
You are going to build a counter app. This exercise consists of two buttons that increment or decrement the state of our app. You are going to implement Hooks to see the benefits of using them, and how to integrate TypeScript and Redux. Then, you are going to test with Jest.
Redux is a package that helps us create only one state into our app. The only way to change the state is through dispatch actions.
The tutorial describes:
- Getting started with TypeScript
- Install environment
- Redux
- How does it work?
- Actions
- Type
- Reducers
… and more. Reducers help us specify how the state will change. They are a response to the actions sent to the store. The actions describe what happened, they do not describe how the state will change. Easy read with plenty of code examples!
[Read More]