Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
RemoteOpener.md 276 B

Toggle a boolean flag and pass it around in your React components tree.

<RemoteOpener>
  {(expanded, toggle) => (
    <div>
      <button onClick={toggle}>Toggle</button>
      <span>{expanded ? 'Collapse me!' : 'Expand me!'}</span>
    </div>
  )}
</RemoteOpener>