Skip to content

Multiple store slices #201

@aibrasimov1

Description

@aibrasimov1

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions