react native - How can I get value of Text Component? -


<text>aircraft</text> 

i need aircraft in text, , change value of text dynamically. how do?

you can access (example: https://rnplay.org/apps/achjeq)

<text ref={(elem) => this.textelem = elem}>hello world!</text>

and then: console.log('textelem content', this.textelem.props.children);

but can't set since it's (read-only) prop.


Comments

Popular posts from this blog

How to use SUM() in MySQL for calculated values -

ios - IBOutlet for image button not correctly referencing button after recreating outlet -

java - AEM: 403 Forbidden occurs when call a Post servlet -