I built a custom hook, that takes an initialState argument and stores it internally using three useState hooks. This works fine for object values,
initialState
useState