Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { schema } from "normalizr";
- import createDB from "react-use-database";
- let TodoSchema = new schema.Entity("Todo");
- let models = [TodoSchema];
- let [ DatabaseProvider, useDB ] = createDB(
- models,
- {
- storedQueryDefinitions: {
- ALL_TODOS: {
- schema: [TodoSchema],
- defaultValue: []
- },
- }
- }
- );
Add Comment
Please, Sign In to add comment