SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { schema } from 'normalizr';
  2.  
  3. const UserSchema = new schema.Entity(
  4.   "User",
  5.   {},
  6.   { idAttribute: "id" }
  7. );
  8.  
  9. const TodoSchema = new schema.Entity(
  10.   "Todo",
  11.   { author: UserSchema },
  12.   { idAttribute: "id" }
  13. );
  14.  
  15. const responseSchema = new schema.Object({ 
  16.  body: new schema.Array(TodoSchema)
  17. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top