Answer the question
In order to leave comments, you need to log in
How to call a function from a child component?
I have an App parent:
render() {
return (
<div>
<Filtered items={this.state.items} />
</div>
)
}
Answer the question
In order to leave comments, you need to log in
my JS code is executed from render(), and I would like that in render() I have only the result of the function execution
render() {
return (
<div>
{ this.props.items.map(item => <div>{ item.someText }</div>) }
</div>
)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question