question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Combine zundo middleware with immer & devtools

See original GitHub issue

recently, I work on a project that uses zustand store as its state manager.

so I want to add undo & redo feature for my store but here is the problem :

image

This my imports import create from "zustand"; import { immer } from "zustand/middleware/immer"; import { devtools } from "zustand/middleware"; import { UndoState ,undoMiddleware} from "zundo";

store type: export interface BookBuilderStore extends UndoState { . . . }

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
charkourcommented, Sep 23, 2022

Hey @mowhcen,

I’ve released a beta version of zundo. You can install it with npm i zundo@beta. Please reopen the issue if you run into problems. Thanks for your patience!

1reaction
mowhcencommented, Sep 16, 2022

sounds great i will look into it 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

pmndrs/zustand: Bear necessities for state ... - GitHub
A small, fast and scalable bearbones state-management solution using simplified flux principles. Has a comfy api based on hooks, isn't boilerplatey or ...
Read more >
Third-party Libraries - Zustand Documentation
zoov — State management solution based on Zustand with Module-like API. zundo — Undo and redo middleware for Zustand, enabling time-travel in your...
Read more >
Stop Overcomplicating your State – Try Zustand
We just need to import the devtools middleware, and attach it to our store. ... Immer is another great package that makes reducing...
Read more >
applyMiddleware - Redux
Multiple middleware can be combined together, where each middleware requires no knowledge of what comes before or after it in the chain.
Read more >
How to combine state sanitizer with existing middleware in ...
applyMiddleware (thunk, logger) : applyMiddleware(thunk) // sanitizers to keep redux devtools from using excessive memory const ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found