xplato / useUndoable

↪ React hook for undo/redo functionality (with batteries included)
MIT License
168 stars 7 forks source link

Undo Redo In React-flow #8

Closed Hamza-malikx closed 2 years ago

Hamza-malikx commented 2 years ago

Hey, greeting ! Firstly, thank u for your contributions to react-flow but right now the issue I am facing is that when I use custom nodes and edges and I have initial nodes as empty then undo-redo doesn't work for me. Could u guys plss help me with it.

xplato commented 2 years ago

Can you share some of your code with me so I can have some context?

When you call useUndoable() the value inside the parentheses is your initial state. If you have it as an empty array by default, it stands to reason it will always be empty unless you manually add items to the state.

Hamza-malikx commented 2 years ago

Ok,, I will probably be sharing a video with you in a day or so and if you could help me that would means a-lot. Meanwhile, we are fixing some other issues in our project. Thank u for giving me your precious time :)

xplato commented 2 years ago

I'm going to close this due to inactivity, but feel free to re-open it when/if you'd like to revisit this. Thanks!