- remove useMemo and useCallback where they are not necessary
- split contexts to reduce re-renders
- move states (like viewportWidth) down to contexts, to reduce the number of rerenders
Note that we continue to rely on contexts for the global state. We might switch to a state library to reduce boilerplate, but that would add a dependency. See #431 (comment)
I'm opening this meta-issue because I will do it in multiple small PRs to make it easier to review. See mentions below.
Note that we continue to rely on contexts for the global state. We might switch to a state library to reduce boilerplate, but that would add a dependency. See #431 (comment)
I'm opening this meta-issue because I will do it in multiple small PRs to make it easier to review. See mentions below.