Comment

Andrew

I suggest to migrate to hooks and use tiny libraries to manage nested and complex state, for example the one specifically dedicated to complex state management https://github.com/avkonst/react-use-state-x and 2 hooks: useMap and useList from react-use package. Disclaimer: I am an author of the first lib.