DEV Community

loading...

Discussion on: Create your own radio button component in react native easily

Collapse
dondes17 profile image
Emmanuel

hello , how you can pass the state in a props of your component ?

Collapse
sircqq profile image
SirCQQ

When you use a component that you create you can pass props like arguments, there you can pass the state too like

In you component you can access it like

{this.props.nameOfThePropInTheComponent}

Hope it helps you :D

Collapse
dondes17 profile image
Emmanuel

in fact, I found the answer rather quickly but on the spot I do not remember more ....
Thank you for your answer !!