DEV Community

Discussion on: How to use useReducer hook to mimic setState method?

avkonst profile image

Your state might arrive from an external source as a complete object. You may also have a 'table' component which renders and manages the state of the entire table. So complex objects is a state are actually very usual.