If performance ever becomes a problem, here are some steps that should probably be tried first:
- Wrap most components that need it in
React.memo (as described by this post, React doesn't memoize with shallow props comparison by default like I thought)
- Split up context objects like
{ modificationState, setModificationState, loadPlaylist } into separate contexts, and maybe adding a convenience wrapper to avoid nested Providers in the JSX (reference)
If performance ever becomes a problem, here are some steps that should probably be tried first:
React.memo(as described by this post, React doesn't memoize with shallow props comparison by default like I thought){ modificationState, setModificationState, loadPlaylist }into separate contexts, and maybe adding a convenience wrapper to avoid nested Providers in the JSX (reference)