score:3

class Store {

   constructor() {
     this.registerAction('showModal', setModalVisibility);
   }
   setModalVisiblity(showModal) {
      this.setState({showModal: showModal});
   }
}

class Action {
    showModal(showModal) {
       return showModal;
    }
}

class MyOtherComponent {
   render() {
     return (<div onClick={someFluxInstance.getActions().showModal}>Click</div>
   }
}

class Layout {
  render() {
    if(this.props.showModal) {
      <Modal />
    }
  }
}

Related Query

More Query from same tag