2. Rules #
Created Sat Dec 30, 2023 at 1:33 PM
- Navigation nature is guaranteed only within the navigator.
- Each navigator must be a component, the name of this component will be the name (string) of the navigator.
- Each child of navigator has to be a screen. If a child is a navigator, it will be registered as a screen with component prop being the nested navigator component.
- Groups are meant for concise coding of header variations. If Groups construct didn’t exist, mere difference of header would have necessitated the need to create a new navigator, and code for navigation would be cumbersome, even though the screens are semantically related but just differ in the header.
- A navigator specifies header for all* screens under it. * meaning all direct (since groups are possible).
options
callback prop onor have the same value as if it were inside a Screen. What this means - that headerUI is semantically meant to be a component inside the screen. This rule holds for other navigators too - Navigator level header setting are actually an after thought, and are used if all screens have the same styling.