React Hook, Hooks, React.
newState=reducer(currentState,action) reducer returns pair of values as [newState,dispatch] Example: import React, { useReducer } from ‘react’ const initialState = 0; const reducer = (state, action) => { switch (action) { case ‘increment’: return state + 1; case ‘decrement’: return state — 1; case