Using React 18 and strict mode, the onRemove handler passed to the useControl hook seems to be called immediately after the onCreate handler, and this is expected due to how strict mode works in React 18. The problem is that the mount function is not called again afterwards, so it stays unmounted. If I disable strict mode, it works as intended.
Expected Behavior
Expect the onCreate function to be called again when the component remounts.
Description
Using React 18 and strict mode, the
onRemove
handler passed to theuseControl
hook seems to be called immediately after theonCreate
handler, and this is expected due to how strict mode works in React 18. The problem is that the mount function is not called again afterwards, so it stays unmounted. If I disable strict mode, it works as intended.Expected Behavior
Expect the
onCreate
function to be called again when the component remounts.Steps to Reproduce
Environment
Logs
No response