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

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

java - Could not retrieve pre-bound Hibernate session - Could not obtain transaction-synchronized Session for current thread -

java - ConcurrentModificationException upon committing transaction with Hibernate -