Skip to content

Refactor: use Zustand stores for all state management #222

Description

@AndreFavotto

We already use Zustand to manage context for PV updates, which works pretty well as a widget only rerenders if the PV it subscribes to re-renders.
This only happens though on runtime mode (LiveWidget.tsx).
During editMode we use a standard React Context, and this makes a huge part of the app to re-render whenever something on the global context changes.
This decreases performance, and is noticeable for example on delays when switching between selected widgets for example.

Proposed fix: move everything to zustand store management.
It will envolve a considerable code reorganization, but may AI help us on that!

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

    enhancementImprovement on already-existent featurefrontendFront-end related issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions