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

ruby on rails - ActiveRecord order not working -

javascript - How do you prevent nested queries/catches in sequelize? -

java - ConcurrentModificationException upon committing transaction with Hibernate -