You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the React.StrictMode in my application and onDeactivation callback for some logic.
I expect this callback to be called on unmounting or on disabling FocusLock, but in StrictMode it is called on render (it shouldn't happen), also I see that 'onActivation' also is called 2 times:
In comparison to it I am attaching the correct behaviour for not StrictMode:
I use the
React.StrictMode
in my application andonDeactivation
callback for some logic.I expect this callback to be called on unmounting or on disabling FocusLock, but in StrictMode it is called on render (it shouldn't happen), also I see that 'onActivation' also is called 2 times:
In comparison to it I am attaching the correct behaviour for not StrictMode:
Sandbox: https://codesandbox.io/p/sandbox/react-focus-lock-demo-forked-nlsfpv
Steps to reproduce this issue:
To see the expected behaviour, - just remove the
<StrictMode>
in App.jsIt looks like this behaviour is broken when 'react-focus-lock' is used in the application with React v18.
The text was updated successfully, but these errors were encountered: