React FlowReact Flow
  • 学习
  • 示例
  • 分享
⌘ K
赞助商
功能预览
交互
撤销和重做
最后更新时间:
帮助改进此文档
Made with ❤️ by 紫升
本页访问量 | 本站总访问量 | 本站总访人数
‌
‌
‌
‌

此示例展示了如何基于 Zustand 和 Zundo 为 React Flow 实现简单的撤销和重做功能。

由于 strange node reorder after setNode 问题,基于 Sub Flow 的话需要自己实现 addEdges 和 addNodes 方法。

Press enter or space to select a node.You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.