geist-ui
geist-ui copied to clipboard
fix(keyboard): improve keyboard hook with callback
trafficstars
Checklist
- [x] Fix linting errors
- [x] Tests have been added / updated (or snapshots)
Change information
- [x] Uses
React.useCallbackto memoize the event handler function for better performance and to avoid unnecessary re-renders. - [x] Adds all dependencies to the
React.useCallbackdependencies array to ensure that the function is correctly updated when any of its dependencies change. - [x] Uses
React.useEffectwith a full dependency array to ensure that the event listener is correctly added and removed when the component mounts and unmounts, respectively (which wasn't the case before). - [x] Adds default values to
isCaptureandelementEventTypearguments of theelementBindingHandlerfunction.
Deploy Preview for geist-ui ready!
| Name | Link |
|---|---|
| Latest commit | 1049c1af36aec2326997460ca79e18f6e6d72f3b |
| Latest deploy log | https://app.netlify.com/sites/geist-ui/deploys/642fe2f03977a80008b5e469 |
| Deploy Preview | https://deploy-preview-831--geist-ui.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Hey @unix can you give it a look ? 😁