react-storage-drafts
Version:
React Drafts is a library for creating, saving, and managing local documents in React applications.
14 lines (13 loc) • 339 B
JavaScript
import { createContext } from 'react';
const DraftsContext = createContext({
drafts: [],
count: 0,
addDraft: () => { },
clearDrafts: () => { },
getDraft: () => null,
removeDraft: () => { },
updateDraft: () => { },
referenceKey: '',
handleSync: () => Promise.resolve(),
});
export default DraftsContext;