In React, usually only two main tools are used.

  1. Routing Tools
  2. State Management Tools

React Routing

React is a Single-Page Application (SPA) library, where different pages are loaded without reloading the entire page. This is called Routing.

State Management in React

State Management is a technique in React through which we handle the data being used inside components — especially when the data needs to be shared between multiple components.

In React apps, many times:

In such cases, proper state management becomes necessary.

State Management Method

To manage state, we generally use two core actions:

  1. Read state → Accessing state variables ( const [count, setCount] = useState(0)) → here count is used to read
  2. Update state → Calling state setter ( setCount(newValue)) to update

image.png

React Routing & State Management — Starter Templates