createDocStore
Creates a SyncState store that holds your document/app state. There should only be a single store in your app.
Arguments
initialDoc
(Object): The initial document/state.plugins
(Array?) : SyncState Plugins which can add a middleware for the internal Redux store and provide extra functionality.
Returns
(store
): An object that holds a document representing the complete state of your app.
Example
import { createDocStore } from "@syncstate/core";
import history from "@syncstate/history";
const store = createDocStore({ todos: [], filter: "all" }, [
history.createInitializer(),
]);