score:0

hmm, can you try having videoplayer accept a state variable from the parent to determine whether it is "playing" or not? so when you press on either videoplayer it fires a callback to the parent that changes the state to true/false and passes that back into both children simultaneously?

so essentially you have this:

render() {
  const videoplayer = (<videoplayer episode={this.props.firstepisode} isplaying={this.state.isvideoplaying} />)
  <view>
   {videoplayer}
   {videoplayer}
  </view>
}

and videoplayer would no longer have its own state, just props.


Related Query

More Query from same tag