File tree Expand file tree Collapse file tree 3 files changed +47
-29
lines changed Expand file tree Collapse file tree 3 files changed +47
-29
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import { NavigationContainer } from '@react-navigation/native' ;
33import { createStackNavigator } from '@react-navigation/stack' ;
44import { SafeAreaView , StatusBar , StyleSheet } from 'react-native' ;
5+ import { RootSiblingParent } from 'react-native-root-siblings' ;
56
67import { stackPageData } from './routes' ;
78
@@ -15,34 +16,36 @@ const styles = StyleSheet.create({
1516
1617const App = ( ) => {
1718 return (
18- < SafeAreaView style = { styles . block } >
19- < StatusBar barStyle = "dark-content" />
20- < NavigationContainer >
21- < Stack . Navigator initialRouteName = "Home" >
22- < Stack . Screen
23- name = "Home"
24- component = { require ( './Home' ) . default }
25- options = { {
26- headerTitle : 'Home' ,
27- // header: () => null,
28- } }
29- />
30- { stackPageData . map ( ( props : any , index : number ) => {
31- return (
32- < Stack . Screen
33- key = { index }
34- { ...props }
35- // name="Home"
36- // options={{
37- // header: () => null
38- // }}
39- // component={Home}
40- />
41- ) ;
42- } ) }
43- </ Stack . Navigator >
44- </ NavigationContainer >
45- </ SafeAreaView >
19+ < RootSiblingParent >
20+ < SafeAreaView style = { styles . block } >
21+ < StatusBar barStyle = "dark-content" />
22+ < NavigationContainer >
23+ < Stack . Navigator initialRouteName = "Home" >
24+ < Stack . Screen
25+ name = "Home"
26+ component = { require ( './Home' ) . default }
27+ options = { {
28+ headerTitle : 'Home' ,
29+ // header: () => null,
30+ } }
31+ />
32+ { stackPageData . map ( ( props : any , index : number ) => {
33+ return (
34+ < Stack . Screen
35+ key = { index }
36+ { ...props }
37+ // name="Home"
38+ // options={{
39+ // header: () => null
40+ // }}
41+ // component={Home}
42+ />
43+ ) ;
44+ } ) }
45+ </ Stack . Navigator >
46+ </ NavigationContainer >
47+ </ SafeAreaView >
48+ </ RootSiblingParent >
4649 ) ;
4750} ;
4851
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ A UI component library based on React Native (Android & iOS).
3535## Install
3636
3737``` bash
38- yarn add @uiw/react-native react-native-svg
38+ yarn add @uiw/react-native react-native-svg react-native-root-siblings
3939```
4040
4141## Basic Usage
Original file line number Diff line number Diff line change @@ -3,6 +3,21 @@ Toast 轻提示
33
44一种轻量级反馈/提示,可以用来显示不会打断用户操作的内容,适合用于页面转场、数据交互的等场景中。
55
6+ 组件基于[ ` react-native-root-siblings ` ] ( https://github.com/magicismight/react-native-root-siblings ) 插件开发, 当 ` react native >= 0.62 ` 时,需要在程序中插入一个装入容器
7+
8+
9+ ``` jsx
10+ import { RootSiblingParent } from ' react-native-root-siblings' ;
11+
12+ export default () => {
13+ return (
14+ < RootSiblingParent>
15+ < App / >
16+ < / RootSiblingParent>
17+ )
18+ }
19+ ```
20+
621## 基础示例
722
823``` jsx
You can’t perform that action at this time.
0 commit comments