reading-notes

Reading Notes

View the Project on GitHub simon-panek/reading-notes

Code 401: Class 32 - Custom Hooks


Questions

  1. What does a component’s lifecycle refer to? The time between mounting and unmounting a component.

  2. Why do you sometimes need to “wrap” functions in useCallback when called from within useEffect? Prevents the recreation of a function

  3. Why are functional components preferred over class components? Functional components are just standard JS functions.

  4. What is wrong with the following code? Hooks should not be used inside of a loop?

Vocabulary

Read: Custom Hooks

Read: Async Hooks

Read: useReducer Hook

Read: React Custom Hooks

Read: Use Hooks

Read: Hooks List

Read: 10 Essential React Hooks

  1. useArray provides access to many array methods
  2. react-use-form-state quick way to setup form
  3. react-fetch-hook quick way to setup a fetch and provide isLoading state
  4. useMedia hook tracks the state of CSS media query
  5. react-useportal way to render children in to a DOM node that exists outside of the parents hierarchy
  6. react-firebase-hooks used for firebase authentication
  7. use-onClickOutside way to know if a user clicks anywhere besides the target
  8. use-IntersectionObserver provides a way to asynchronously observer changes in an intersection target of an element and ancestor element
  9. use-location for getting the location of the browser
  10. use-redux hook returns the store and dispatch property

Return to reading-notes Deployed Site

Return to reading-notes Mark Down