- React Suspense “wait” for anything else, including data.
- React Lazy help you “lazy-load” just the things that are currently needed by the user.
- Handle network errors handle network errors using Axios with the usual HTTP error status codes, and show error from the global state (context).
- Dispatch Context from useCallback using dispatch without reducer and prevent the re-creation of a function (small-apps).
- useMemo inside Context prevent re-render the child tree if all useMemo inputs are the same.
- Multiple requests using Axios use
Axios.all()
to make multiple HTTP requests in parallel.
npx create-react-app my-app
cd my-app
npm start
If you've previously installed create-react-app
globally via npm install -g create-react-app
, we recommend you uninstall the package using npm uninstall -g create-react-app
or yarn global remove create-react-app
to ensure that npx always uses the latest version.