Skip to content

Instantly share code, notes, and snippets.

@alessbell
Last active December 18, 2019 18:43
Show Gist options
  • Save alessbell/6cd6a82295d6a578be6b2ca3cad7068e to your computer and use it in GitHub Desktop.
Save alessbell/6cd6a82295d6a578be6b2ca3cad7068e to your computer and use it in GitHub Desktop.

Hooks! 🎣

Resources

Docs

  • React Hooks API Reference
    • Is it safe to omit functions from the list of dependencies? [link] (no.)
    • What can I do if my effect dependencies change too often? [link]
    • Functional updates [link]
    • Using the Effect Hook [link]

Blogs

Workshops/Demos

  • React Training's Hooks Workshop
  • Alessia's hooks CodeSandbox demo

    You may rely on useMemo as a performance optimization, not as a semantic guarantee. In the future, React may choose to “forget” some previously memoized values and recalculate them on next render, e.g. to free memory for offscreen components. Write your code so that it still works without useMemo — and then add it to optimize performance.

Recipes

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