Usage
Parameters
Initial state object
Return Value
Returns a tuple similar touseState:
Current state object
State setter that merges partial updates into the existing state.Can accept either:
- A partial state object to merge
- A function that receives the current state and returns a partial update