Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] expose zustand stores in a more native way #4527

Open
JamesAPetts opened this issue Nov 18, 2024 · 0 comments
Open

[Feature Request] expose zustand stores in a more native way #4527

JamesAPetts opened this issue Nov 18, 2024 · 0 comments
Assignees

Comments

@JamesAPetts
Copy link
Member

What feature or change would you like to see made?

With 3.9 we got rid of the state sync service and are instead using zustand stores.

From within any other extension, we could previously get these in a kind of "native" ohif manner by:

const { stateSyncService } = servicesManager.services;
const { toggleOneUpViewportGridStore } = stateSyncService.getState();

Whereas now these are just exports straight off of the extension at top level, we should probably expose them in the utility module or have another module for such stores.

Internally the cornerstone extension grabs these from the monorepo:

import { useToggleOneUpViewportGridStore } from '../../default/src/stores/useToggleOneUpViewportGridStore';

Which is fine internally, but annonying if you have an external extension that wants to write/read to this state.

Why should we prioritize this feature?

It feels like a regression from 3.8's StateSyncService

@sedghi sedghi assigned sedghi and IbrahimCSAE and unassigned sedghi and IbrahimCSAE Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants