Skip to content

add Ref with react ref api #126

Open
@xialvjun

Description

@xialvjun
<Ref>
  {ref => (
    <React.Fragment>
      <button onClick={e => ref.current.openModal()}>open</button>
      <Modal ref={ref}>
        <div>model_content</div>
        <button onClick={e => ref.current.closeModal()}>close</button>
      </Modal>
    </React.Fragment>
  )}
</Ref>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions