How to pass props to Screen component with a tab navigator?

前端 未结 4 1207
灰色年华
灰色年华 2021-02-07 08:51

This is my first post on StackOverflow, so apologies if I\'m not following the correct format.

I\'m building my first app using tab navigator from React Navigation

4条回答
  •  余生分开走
    2021-02-07 09:20

    you can use the property 'children' to pass an element type jsx like instead of the property 'component', is recomended from react-native.

    On this way you can pass props to component example:

        }
        />
    

    is neccesary to use '()=>' because the property children need a function that return a jsx element, it's functional.

提交回复
热议问题