tomerbu-todo-store
v1.0.25
Published
todo list store
Downloads
12
Readme
Tomerbu Todo Store
A shared Redux store for managing todos, designed to be used with WordPress blocks.
Installation
npm install tomerbu-todo-store
Usage
import { useDispatch, useSelect } from "@wordpress/data";
const todos = useSelect((select) => select.getTodos(), []);
const useTodoDispatch = useDispatch("todos-store");
useTodoDispatch().addTodo({
id: Date.now(),
text: "New Todo",
});