DEV Community

John Michael Biddulph
John Michael Biddulph

Posted on

How can I use state in another component?

Hi,

So I have my state setup in my main component, I have a TextInput with setState I would like to put into a separate screen (which means a new component). What is the best way to do this?

Thanks

John

Top comments (2)

Collapse
 
thatosmk profile image
Thato Semoko

Sorry is this with vuejs or a different framework?

Collapse
 
jbiddulph profile image
John Michael Biddulph

Iā€™m working with React Native