Skip to main content

Introduction

Redux as predictable state container for JavaScript/TypeScript apps, helps writing apps to behave consistently, and being able to run in different environments (client, server, and native) as well as to test them easier. Redux can be used with React.

Read More

Briefly, Redux can be introduced as follows:

It operates as a integrated store for state that requires it to be managed throughout the whole application, with methods to make sure that the state can merely be updated in a predictable manner. Redux is controlling and updating application state by the use of events known as "actions".

Redux Installation for existing applications#

For writing Redux logic, Redux Toolkit is required that can be obtained from the following instruction in your app's root command line:

yarn add @reduxjs/toolkit

Redux Installation for new applications#

A React app integrated with Redux will be created as follows:

Redux + JavaScript template#

npx create-react-app my-app --template redux

Redux + TypeScript template#

npx create-react-app my-app --template redux-typescript