Skip to content

Makes focusPath prop optional  #6

@celiolatorraca

Description

@celiolatorraca

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions