If the value you need can be computed entirely from the current props or other state, remove that redundant state altogether.
If you’re worried about recomputing too often, the useMemo Hook can help.
If you want to reset the entire component tree’s state, pass a different key to your component.
If you can, update all the relevant state in the event handlers.