@nmn need to `useEffect()` to use the methods. `ontoggle`, `onbeforetoggle` don't work. I think the latter is fixed in 19 but still now way to call `showPopover` or `showModal` without a hook AFAIK.
Top-level
3 comments
@keithamus You can call showPopover or showModal in a regular event handler function. Doesn’t need to be a hook. |
@keithamus @nmn where would you rather call `showPopover` and `showModal`? it's imperative code