Just opened this issue to jot down some ideas for possible fixes:
lift state further up (App.js and/or Toolbar) and pass in as props. Might work, might not.
restrict rerendering of react grid (useCallback or memoize). Hacky and weird, ugh
save layout on every change to localstorage or state. This seems to be what the official examples do? We gotta take another look at the code of this one here. (Also this for localStorage, but later).
Honestly not sure what we’re doing wrong, they’re updating the state all the time too but their example doesn’t behave like ours (Their example rerenders as well, but doesn’t do a full reset to the default layout. Maybe because they don’t bind the layout to element IDs but generate it dynamically on the fly from a state array? Or it’s just because they save everything to the state and I overlooked it.).
give up and use a state management library / have every window manage their hidden/shown state locally too
Just opened this issue to jot down some ideas for possible fixes: