Closed aylabyuk closed 7 years ago
I don't understand your question.
He asks if it's possible to pass data to the component by adding prop 'markers' to the component in render method where he initialized it.
For example
class App extends React.Component {
constructor(props){
super(props)
this.state = { markers: [] }
}
render(){
return (<div>
<Gmap markers={this.state.markers} />
</div>
)
}
}
I understand you can change markers using
but is it also possible to use the usual way of passing props to set the markers?
<Gmap markers={markers} />