Skip to content

Conversation

@antoinekm
Copy link
Contributor

@antoinekm antoinekm commented Apr 7, 2023

Checklist

  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information

  • Uses React.useCallback to memoize the event handler function for better performance and to avoid unnecessary re-renders.
  • Adds all dependencies to the React.useCallback dependencies array to ensure that the function is correctly updated when any of its dependencies change.
  • Uses React.useEffect with 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).
  • Adds default values to isCapture and elementEventType arguments of the elementBindingHandler function.

@netlify
Copy link

netlify bot commented Apr 7, 2023

Deploy Preview for geist-ui ready!

Name Link
🔨 Latest commit 1049c1a
🔍 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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antoinekm
Copy link
Contributor Author

Hey @unix can you give it a look ? 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant