-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
For now, the focusPath is required. What would be the best approach to change it?
What is the problem?
As a react-based component, we lay on react lifecycle...
- After a component mounts, we register it to focus manager and if there is no
focusPathprovided, the manager generates a new one. - When this component is re-rendered, as a normal react component, we unregister this component from the focus manager while unmounting it, then register again after mounting the new one.
But, if we are generating a new focusPath for components that didn't provide one, after this cycle we would have a currentFocusPath (injected by withNavigation) pointing to an element that was already unmounted...
What do you think we can do to avoid this?