Skip to content

Simplify state and memoization #449

Description

@severo
  1. remove useMemo and useCallback where they are not necessary
  2. split contexts to reduce re-renders
  3. 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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions