State Shape - saipat/Eton GitHub Wiki

State Shape

{
    entities: {
        users: {
            1: {    
                id: 1,
                username: 'bugs',
                email: '[email protected]'
            }
            2: {
                id: 2,
                username: 'mrbean',
                email: '[email protected]'
            }
            3: {
                id: 2,
                username: 'scooby',
                email: '[email protected]'
            }
            4: {
                id: 4,
                username: 'shaggy',
                email: '[email protected]'
            }
        }
        notes: {
            11:{
                id: 11,
                title: "Bugs cartoon",
                notebookId: 21,
                plainTxtBody: "bugs is best known for his Starring roles in the Looney Tunes and Merrie Melodies series of animated short films, produced by barner bros.",
                richTxtBody: "Bugs is best known for his <strong>Starring</strong> roles in the <b>Looney Tunes</b> and <b>Merrie Melodies</b> series of animated short films, produced by Warner Bros.",
            }
            12:{
                id: 12,
                title: "Hilarious Mr.Bean",
                notebookId: 22,
                plainTxtBody: "The humour largely comes from his original (and often absurd) solutions to problems and his total disregard for others when solving them, his pettiness and occasional malevolence.",
                richTxtBody: "<p>The humour largely comes from his original (and often absurd) solutions to problems and his <i>total disregard</i> for others when solving them, his pettiness and occasional malevolence.</p>",
            }
            13:{
                id: 13,
                title: "Scooby and Shaggy",
                notebookId: 21,
                plainTxtBody: "Maybe we can dig up some answers to this mystery! Let’s split up gang.",
                richTxtBody: "<h3>Maybe we can dig up some answers to this <b>mystery!</b> Let’s split up gang.</h3>",
            }
            14:{
                id: 11,
                title: "Bugs cartoon",
                notebookId: 23,
                plainTxtBody: "My favorite cartoon of all times.",
                richTxtBody: "My <strong>favorite cartoon</strong> of all times.",
            }
        }
        notebooks: {
            21: {
                id: 21,
                name: 'Cartoons',
                userId: 1
            }
            22: {
                id: 22,
                name: 'Fun Time',
                userId: 2
            }
            23: {
                id: 23
                name: 'Think',
                userId: 3
            }
        }
        tags: {
            31: {
                id: 31,
                userId: 1,
                tagName: 'bean'
            }
            32: {
                id: 32,
                userId: 2,
                tagName: 'scooby'
            }
            33: {
                id: 33,
                userId: 1,
                tagName: 'mystery'
            }
            34: {
                id: 34,
                userId: 1,
                tagName: 'bugs'
            }
        }
        tagsNotes:{
            41:{
                id: 41,
                tagId: 31,
                noteId: 12
            }
            42:{
                id: 42,
                tagId: 32,
                noteId: 13
            }
            43:{
                id: 43,
                tagId: 33,
                noteId: 13
            }
            44:{
                id: 44,
                tagId: 34,
                noteId: 14
            }
        }
    }
    ui: {
        loading: true/false
    },
    errors: {
        login: ["Incorrect username/password combination"]
    },
    session: { 
        currentUserId: 1 
    }
}
⚠️ **GitHub.com Fallback** ⚠️