import { useReducer } from "react";
      
      const [state, dispatch] = useReducer(reducer, initialArg, init);
      
      Typescript language logo
      your recipe card header background

      React useReducer

      0

      0

      avatar
      Jose Romero
      react
      hook
      useReducer
      ...
      React TypeScript Recipes

      An alternative to useState. Accepts a reducer of type (state, action) => newState, and returns the current state paired with a dispatch method. (If you’re familiar with Redux, you already know how this works.)

      Library: react

      Shortcut: react.hook.reducer.use

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.