Open
Description
Summary:
Why doesn't react-modal
use imperative style?
I mean, following:
class MyComponent extends Component {
constructor() {
super();
...
this.modal = ...
...
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.modal.open(<div>Some content of modal.</div>);
}
render() {
return (<button onClick = {this.handleClick} >Click me to open modal</button>);
}
}