Solid Record

screenshot of Solid Record
solid
vite

Simple undo/redo primitive for solidjs using the command pattern

Overview

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.

Features

  • Simple Integration: Quickly implement the history management system using createHistory() to start tracking state changes seamlessly.
  • Undo and Redo: Easily manage user actions with undo() and redo() methods, providing a straightforward way to revert or reapply changes.
  • Manual Updates: The add() method allows developers to manually record updates by providing setter functions, enhancing control over state changes.
  • Batching Commands: Use batch() to group multiple updates into one command, streamlining the undo/redo process with unbatch() to finalize changes.
  • Pause and Resume: Temporarily halt recording with pause(), and easily resume with resume(), giving you enhanced control over state management.
  • State Capture and Restore: capture() and restore() methods facilitate saving and reverting to previous states, adding more depth to state management.
  • Status Checks: Methods such as isPaused(), isBatched(), isUndoable(), and isRedoable() provide insights into the current state of history tracking, ensuring you know when actions can be taken.
  • Typed Record Function: The record() function offers type-safe access to signals and stores, while automatically managing their history, eliminating common pitfalls in manual state management.
solid
Solid

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
Vite

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects

rollup
Rollup

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
Typescript

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.