---
title: Slate History
slug: docs/github-example/slate-history
docTags: 
createdAt: 2026-05-05T15:31:38.031Z
---

This sub-library tracks changes to the Slate value state over time, and enables undo and redo functionality.

## `History`

`History` objects hold all of the operations that are applied to a value, so they can be undone or redone as necessary.

## `HistoryEditor`

`HistoryEditor` contains helpers for history-enabled editors.

## `withHistory`

The `withHistory` plugin keeps track of the operation history of a Slate editor as operations are applied to it, using undo and redo stacks.

When used with `withReact`, `withHistory` should be applied inside. For example:

```javascript
const editor = useMemo(() => withReact(withHistory(createEditor())), [])
```
