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
frontend: remove unsafe componnetwillmount fix esc in webdev
When Strict Mode is on, React will also run one extra setup+cleanup
cycle in development. This helps reveal subtle bugs that are hard
to catch manually. This also makes the deprecated UNSAFE
componentWillMount only run first time.
Send view used UNSAFE_componentWillMount to listen to keydown
events that handles ESC button. In webdev pressing ESC button did
therefore not go back to the account overview.
Changed to register events on componentDidMount.
Also changed deprecated KeyBoardEvent.keyCode to KeyBoardEvent.key.
See:
- https://react.dev/reference/react/StrictMode
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
0 commit comments