How to manage a complex UI state with useReducer hook instead of redux

Manage complex UI state with useReducer
Source: Codementor