React + Redux + TypeScript - into the better frontend (tutorial)

React + Redux + TypeScript - into the better frontend (tutorial)

Instead of keeping all the data inside the components, we use the single, global store which is our source of truth. It defines the whole UI, holds all the dynamic data - both from the server, user and the internal state of the application. Based on this store we can construct our interface.

[…]

Using TypeScript with React can be beneficial in various ways. Except usual benefits of using typed languages (you can read more about it here), in React you can easily type Props and State of the React components. That means that as soon as you use the component in your code, you can get the suggestion of all the props the component accepts. If you forget about mandatory property, TypeScript notify you about it.

[…]

In the repository you can find configured React + TypeScript project with all the components implemented and all basic actions defined. There is the store missing though.

[…]

This is a simple function with just three conditional statements, reacting on each action individually.

[…]