Skip to content

sample state

imshentastic edited this page Dec 8, 2019 · 4 revisions
{
  entities: {
    users: {
      10: {
        id: 10,
        fullName: "James Corden",
        email: "james.corden@gmail.com"
      },
      11: {
        id: 11,
        fullName: "Hermione Granger",
        email: "hermione.granger@gmail.com"
      }
    },
    notes: {
      1: {
        id: 1,
        heading: "Cooking Lessons",
        body: "A watched pot never boils!",
        userId: 10,
        notebook_id: 1,
        tagId: [1],
        starred: false,
        trashed: false
      },
      2: {
        id: 2,
        heading: "Life Lessons",
        body: "The difference between doing something and not doing something is doing something.",
        userId: 10,
        notebookId: 1,
        tagId: [1, 2],
        starred: false,
        trashed: false
      },
      3: {
        id: 3,
        heading: "Mischief Managed",
        body: "Disillusion! That's the spell I'll need to get around undetected.",
        userId: 11,
        notebookId: 2,
        tagId: [],
        starred: true,
        trashed: false
      },
        4: {
        id: 4,
        heading: "N.E.W.T.S.",
        body: "Study hard in Potions! Attend office hours with Professor McGonagall.",
        user_id: 11,
        notebookId: null,
        tagId: [3],
        starred: false,
        trashed: false
      },
    },
    notebooks: {
      1: {
        id: 1,
        title: "My Daily Musings",
        userId: 10,
        starred: true,
        trashed: false,
        default: true
      },
      2: {
        id: 2,
        title: "A History of Magic",
        userId: 11,
        trashed: false,
        default: true
      }
    },
    tags: {
      1: {
        id: 1,
        noteId: [1,2],
        hashtag: "sensational",
        starred: true
      },
      2: {
        id: 2,
        noteId: [2],
        hashtag: "memorable",
        starred: false
      },
      3: {
        id: 3,
        noteId: 4,
        hashtag: "important",
        starred: false
      }
    }
  },
  ui: {
    loading: true/false
  },
  errors: {
    login: ["Wrong email/password credentials", "Password needs at least six characters"]
  },
  session: { currentUserId: 10}
}

Clone this wiki locally