Table freezes with observable from MobX
I've got a project with mobx-state-tree (https://mobx-state-tree.js.org/intro/welcome) and Tanstack Table. The following components freezes completely when I have the page including it open and I create a new item.
observer()
is from mobx-react-lite. I believe the problem is some infinite loop due to not memoizing the data, but all my attempts have not helped. Any ideas?3 Replies
vicious-goldOP•2y ago
wise-white•2y ago
Data and Columns need a stable reference. I thought Mobx would provide that, but I guess it works differently?
vicious-goldOP•2y ago
Yeah, thought so too. I put
data
in useState
and change it with useEffect
and everything seems to work properly. Not sure if I'll run into problems later.