Skip to content

Instantly share code, notes, and snippets.

@dgtlmonk
Created August 25, 2022 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgtlmonk/f63578671423e88a0d4d8eb091bd07ed to your computer and use it in GitHub Desktop.
Save dgtlmonk/f63578671423e88a0d4d8eb091bd07ed to your computer and use it in GitHub Desktop.
react re-render
React avoiding re-render
Children as Props
Moving state down
Component as Props
React.memo
This can be useful when rendering a heavy component that is not dependent on the source of re-renders (i.e. state, changed data).
@dgtlmonk
Copy link
Author

Children as Props

part3-passing-as-children

Moving state down

part3-moving-state-down

Component as Props

part3-passing-as-props

React.memo

This can be useful when rendering a heavy component that is not dependent on the source of re-renders (i.e. state, changed data).
const Parent

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