Skip to content

Colocate defining the title of a screen with its screen component #1157

Description

@aurelticot

Set it via the setOptions to avoid it being defined in the Navigator component, far from its context where it can be forgotten

EDIT: Actually, for fixed titles, it could be defined and exported as a constant from the component file and then imported and set in the navigator. This would prevent using a useEffect to set it dynamically while it can be configured statically.
The main point of this ticket is to colocate the title with its screen component rather than far away.
The setOptions will continue to be used for dynamic titles.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions