Skip to content

Sample State

jrogergordon edited this page Aug 12, 2022 · 9 revisions
{
  entities: {
    posts: {
      1: {
        id: 1,
        body: "Well ain't you precious",
        authorId: 1,
      },
      2: {
        id: 2,
        body: "Tomato Tomato Potato Potato",
        authorId: 2,
      },
      3: {
        id: 3,
        body: "beep boop meep moop",
        authorId: 1,
      }
    },
    users: {
      1: {
        id: 1,
        username: "Wonderwall_is_good", 
        email: "bad_music_taste_323@
      },
      2: {
        id: 2,
        username: "I_drink_therefore_I_Wink",
        email: "live_laugh_love_mon221@net.net
      }
    },
    likes: {
        1: {
           id: 1, 
           liker_id: 2,
           postId: 1
        }
    }
  },
  ui: {
    loading: true/false,
    modal: true/false
  },
  errors: {
    login: ["Incorrect username/password combination"],
    postForm: ["Post body cannot be blank"],
  },
  session: { currentUserId: 1 }
}

Clone this wiki locally