score:2

///some code here
state = {
        isOpen: Boolean(false)
    };
                <externalElement onClick={() => this.setState({ isOpen: true })}>title ... </externalElement>
                  <importedModal
                            handleOpen={this.state.isOpen}
                            handleClose={() => this.setState({ isOpen: false })}
                        />

score:5

<Modal ref={(modal) => { this._modal = modal; }} />

Related Query

More Query from same tag