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
focusPath provided, 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?
For now, the
focusPathis required. What would be the best approach to change it?What is the problem?
As a react-based component, we lay on react lifecycle...
focusPathprovided, the manager generates a new one.But, if we are generating a new
focusPathfor components that didn't provide one, after this cycle we would have acurrentFocusPath(injected bywithNavigation) pointing to an element that was already unmounted...What do you think we can do to avoid this?