react-native-navigation的迁移库

layout-stack.mdx 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ---
  2. id: layout-stack
  3. title: Stack
  4. sidebar_label: Stack
  5. ---
  6. A stack is a container layout promoting a hierarchical navigation. It is used to navigate between screens at consecutive levels of hierarchy, steps in a flow or across an app.
  7. ```js
  8. {
  9. id: 'PROFILE_TAB',
  10. children: [
  11. {
  12. component: {
  13. id: 'PROFILE_SCREEN',
  14. name: 'ProfileScreen'
  15. }
  16. }
  17. ]
  18. }
  19. ```
  20. ## `id`
  21. | Type | Required | Description |
  22. | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  23. | string | No | Unique id used to interact with the view via the Navigation api, usually `Navigation.mergeOptions` which accepts the componentId as it's first argument. |
  24. ## `children`
  25. | Type | Required | Description |
  26. | ------------------ | -------- | ----------------------------- |
  27. | [Layout[]](layout-layout.mdx) | YES | Child layouts of any kind. |
  28. ## `options`
  29. | Type | Required | Description |
  30. | ----------------------- | -------- | -------------------------------------------------------- |
  31. | [Options](options-root.mdx) | No | Options that will apply to all screens in stack |