Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-plugin-image): Rename hooks #29462

Merged
merged 1 commit into from
Feb 11, 2021
Merged

fix(gatsby-plugin-image): Rename hooks #29462

merged 1 commit into from
Feb 11, 2021

Conversation

ascorbic
Copy link
Contributor

By giving the helper function hook names (beginnign with use), the eslint React hooks plugin enforces rules of hooks. This is not needed, and prevents people e.g. using them inside loops or in other functions. As we don;t use any React hooks ourselves, we're free to choose other names.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 11, 2021
@ascorbic ascorbic merged commit 4638cd6 into master Feb 11, 2021
@ascorbic ascorbic deleted the chore/rename-hooks branch February 11, 2021 18:39
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 15, 2021
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
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.

None yet

3 participants