Skip to content

Sharing State between Components is Limited #185

@SousaDiconium

Description

@SousaDiconium

Summary

One of the main questions our problem faced when moving to Ethereal Nexus was State Management.
Certain information needs to be shared between the various components.

As far as we have seen, this is not something that is explicitly mentioned within he documentation of Ethereal Nexus.

Description

As mentioned before state management is not something that is discussed in detail within Ethereal Nexus' documentation.
Nonetheless, support was provided by the team of Ethereal Nexus in identifying how this issue could be quickly mitigated.

It was proposed to us that we use alternative dependencies for state management, such as zustand or jotai.
Our initial test suggested that this worked but after some exploration we discovered that this approach is limited.

For components that are built and published together state can be shared between them.
For components that are built separately, either because their are in different repositories or simply set with different versions, they are not able of sharing state.

In order to verify such limitation, we defined within a repository two components: counter-state and counter-state-other.
We published two versions of these components, 1.8.2 and 1.8.3 with no difference whatsoever and using zustand for state management.
When both components are using the same version, the counter gets updated correctly, but when they do not match, state is not shared between components.

See outcome through the attachments in the next section.

We believe this somewhat compromises the goal of Ethereal Nexus, as components cannot be truly published independently when they share state.

Attachments

Both components use version 1.8.3:
Image

One component uses version 1.8.3 and the other 1.8.2:
Image

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