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

Multiple store slices #201

Open
aibrasimov1 opened this issue Feb 5, 2025 · 0 comments
Open

Multiple store slices #201

aibrasimov1 opened this issue Feb 5, 2025 · 0 comments

Comments

@aibrasimov1
Copy link

Hi, I am just starting to work with zundo and I was wondering is it possible to have zundo with multiple store slices, but to wrap only one slice in temporal? Let's say for example I want to wrapt cats slice with temporal, but I don't want to wrap dogs slice. In official docs I found out how I can wrap all slices with temporal, but I don't need that.

export const useBoundStore = create<CatsSlice & DogsSlice >()(
  temporal(
    (...a) => ({
      ...createCatsSlice(...a)
    })
  ),
...createDogsSlice(...a)
);

Thanks!

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

1 participant