noteloom
← Back to blogWhat's new in noteloom 0.3.1: a version history you don't have to think about

30 July 2026

What's new in noteloom 0.3.1: a version history you don't have to think about

One change this release, but a real one: version history went from something you had to wire up and remember to trigger, to something that just happens — and now shows you exactly what changed, not just when.

From manual snapshots to a self-contained component

0.3.0's version history needed createPeriodicVersionSnapshotter (a timer you started and stopped yourself), a manual "Save version now" button calling saveDocumentVersion, and your own list UI built on useDocumentVersions. It worked, but every app had to build the same three pieces.

0.3.1 replaces all of that with one component. createPeriodicVersionSnapshotter is gone — <VersionHistory> captures snapshots automatically after each burst of edits settles down, no button to remember to click:

import { useEditor, NoteloomEditor, VersionHistory } from 'noteloom';

function Editor() {
  const editor = useEditor({ currentUserId: currentUser.id });
  return (
    <NoteloomEditor editor={editor}>
      <VersionHistory docId={docId} />
    </NoteloomEditor>
  );
}

Author attribution, for free

currentUserId (passed to useEditor(), or history.setDefaultActorId(id) for the granular API) is stamped onto every edit automatically. VersionHistory reads it straight off the history log — each version in the drawer shows a real avatar and name, not just a timestamp. Omit it and versions still get created, just attributed to "Unknown."

Word-level diffing

This is the part 0.3.0 didn't have at all: click any version and it opens on a Changes tab — a word-level diff against the version right before it, insertions highlighted green, deletions struck through in red, the same idea as Google Docs' "show changes." A Preview tab sits alongside it for a plain read-only render, plus a Restore button that calls the same applyDocumentTemplate function Templates already uses.

Tuning it

Two props control the capture window; everything else is automatic:

<VersionHistory docId={docId} idleMs={5 * 60 * 1000} maxVersions={200} />
🆕

Need the granular API, or an explicit snapshot right before some risky action? createAutoVersionHistory({ store, docId, idleMs, maxVersions }) returns { stop, flush } — flush() closes and saves the current window immediately instead of waiting for the idle gap.


Upgrading

npm install noteloom@0.3.1 — the useEditor()/<NoteloomEditor> surface itself is unaffected, but if your app called createPeriodicVersionSnapshotter or saveDocumentVersion directly, that specific function is gone. Swap in <VersionHistory docId /> (or createAutoVersionHistory for the granular API) — the lower-level useDocumentVersions/applyDocumentTemplate/diffDocumentsHTML pieces it's built from are still exported individually if you want to build a custom UI instead.

The best version history is the one you never had to remember existed until the moment you needed it.

Read the full Version history doc for every prop and function, or try it live below — edit the text a few times and check the button that appears above the editor.

Read the Version history doc
noteloom.qusere.in/playground

A real, live noteloom instance embedded inside the article. Want the full thing? Open the Playground.