Skip to content

Conversation

@mrkldshv
Copy link
Contributor

WHY are these changes introduced?

Fixes #6615

WHAT is this pull request doing?

Fixes usage of useEffect and useCallback hooks in examples.

Warnings were resolved by:

  • Wrapping variable initialization in useMemo
  • Updating useEffect and useCallback dependency arrays

@ghost
Copy link

ghost commented Jul 24, 2022

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

@ghost ghost added the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Jul 24, 2022
@mrkldshv
Copy link
Contributor Author

@alex-page I've signed CLA, I think we need to rerun workflow. I'll also update README files to have correct examples.

@ghost ghost removed the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Jul 25, 2022
@mrkldshv mrkldshv force-pushed the bugfix/example-react-hooks-warnings branch from c0bd384 to 483d287 Compare July 26, 2022 09:20
@alex-page alex-page merged commit fdf4d83 into Shopify:main Jul 26, 2022
@ghost
Copy link

ghost commented Jul 26, 2022

🎉 Thanks for your contribution to Polaris!

@alex-page
Copy link
Member

Thanks @mrkldshv for the contribution.

@github-actions github-actions bot mentioned this pull request Jul 26, 2022
@mrkldshv mrkldshv deleted the bugfix/example-react-hooks-warnings branch July 26, 2022 22:22
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.

Examples do not correctly useCallback and useEffect

2 participants