You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I click to expand a node, I can't collapse it anymore.
Debugging indicates that the problem lies with the use of context in TreeView/ConnectedTreeComponent. On every componentWillReceiveProps call, the TreeView creates a new store state, which results in all children having different copies of store in their contexts (because context is only read once, during component creation). The store itself should probably be mutable, immutability should only apply to storeState. Or it can be passed via props instead of context.
The problem is easily recreated by periodically updating the parent component, and can be temporarily solved by wrapping the inspector in a PureComponent.
The text was updated successfully, but these errors were encountered:
If I click to expand a node, I can't collapse it anymore.
Debugging indicates that the problem lies with the use of context in
TreeView
/ConnectedTreeComponent
. On everycomponentWillReceiveProps
call, theTreeView
creates a new store state, which results in all children having different copies ofstore
in their contexts (because context is only read once, during component creation). The store itself should probably be mutable, immutability should only apply tostoreState
. Or it can be passed via props instead of context.The problem is easily recreated by periodically updating the parent component, and can be temporarily solved by wrapping the inspector in a
PureComponent
.The text was updated successfully, but these errors were encountered: