Guest User

Untitled

a guest
Feb 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import { schema } from "normalizr";
  2. import createDB from "react-use-database";
  3.  
  4. let TodoSchema = new schema.Entity("Todo");
  5.  
  6. let models = [TodoSchema];
  7.  
  8. let [ DatabaseProvider, useDB ] = createDB(
  9. models,
  10. {
  11. storedQueryDefinitions: {
  12. ALL_TODOS: {
  13. schema: [TodoSchema],
  14. defaultValue: []
  15. },
  16. }
  17. }
  18. );
Add Comment
Please, Sign In to add comment