In previous articles we have already explained how to use TypeScript in regular React and with Material-UI. In this article I will show the most important and difficult part: redux.
Previous articles can be found here:
The packages used in this articles are:
$ npm install --save redux react-redux typesafe-actions \
rxjs redux-observable lodash reselect \
The common and recommended way of using redux is with the combination of
redux-observable. The configuration is a bit complicated so I will explain piece by piece.
This series focus on how to correctly use TypeScript in React application. The previous article explained some details in typing React itself, so this article will focus on Material-UI, one of the most popular UI library.
TypeScript has been increasingly popular. The typing system helps eliminate most of the coding errors at compile time. Generally, TypeScript costs you a significant amount of time on coding and typing, but later on i will save you much more time on debugging.
This series attempts to facilitate the painful efforts of typing, especially when you are not quite familiar with TypeScript. Thus we will focus on typing and nothing else – anything not specifically related to TypeScript, such as the usage of redux, will be ignored.
The demo project for this series can be downloaded at my GitHub: https://github.com/charlee/todolist.