redo()
Description
Repeats the action that was reverted by the undo action
info
If you set the history.projects
parameter to true
, you will be able to manage the history of changes for each project separately; otherwise, you will be able to manage the history of changes for the whole app.
Usage
redo(): void;
Example
const { ToDo } = todo;
const { tasks, users, projects, tags } = getData();
// create To Do List
const list = new ToDo("#root", {
tasks,
users,
projects,
tags,
history: { projects: true, limit: 10 }
});
list.addTask({ text: "New task 1 });
list.undo();
list.redo();
Change log: The redo()
method was added in v1.3
Related API: