
Simple undo/redo primitive for solidjs using the command pattern
The Solid Record library brings an intuitive undo/redo mechanism to SolidJS applications, empowering developers to manage state changes with more flexibility and control. Built on the command pattern, it allows users to share a single history across multiple signals and stores, making it an essential tool for crafting robust user interfaces that require complex state management.
With features like batching updates, pausing and resuming history, and the ability to manually record changes, Solid Record significantly enhances development workflows. Whether you're building simple applications or complex projects, this library provides the necessary tools to capture and navigate state changes efficiently.
createHistory() to start tracking state changes seamlessly.undo() and redo() methods, providing a straightforward way to revert or reapply changes.add() method allows developers to manually record updates by providing setter functions, enhancing control over state changes.batch() to group multiple updates into one command, streamlining the undo/redo process with unbatch() to finalize changes.pause(), and easily resume with resume(), giving you enhanced control over state management.capture() and restore() methods facilitate saving and reverting to previous states, adding more depth to state management.isPaused(), isBatched(), isUndoable(), and isRedoable() provide insights into the current state of history tracking, ensuring you know when actions can be taken.record() function offers type-safe access to signals and stores, while automatically managing their history, eliminating common pitfalls in manual state management.
SolidJS is a declarative JavaScript library for building user interfaces, offering a reactive programming model for efficient updates. It stands out for its reactivity system that minimizes unnecessary re-renders and its small bundle size, making it a performant choice for developing lightweight and reactive web applications.
Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects
RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.
TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.