Created
October 2, 2019 15:32
-
-
Save bdushimi/f2543624af14e0e27cfc1a95597bd2eb to your computer and use it in GitHub Desktop.
A Non-Normalised Store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const blogPosts = [ | |
{ | |
id: 'post1', | |
author: { username: 'user1', name: 'User 1' }, | |
body: '......', | |
comments: [ | |
{ | |
id: 'comment1', | |
author: { username: 'user2', name: 'User 2' }, | |
comment: '.....' | |
}, | |
{ | |
id: 'comment2', | |
author: { username: 'user3', name: 'User 3' }, | |
comment: '.....' | |
} | |
] | |
}, | |
{ | |
id: 'post2', | |
author: { username: 'user2', name: 'User 2' }, | |
body: '......', | |
comments: [ | |
{ | |
id: 'comment3', | |
author: { username: 'user3', name: 'User 3' }, | |
comment: '.....' | |
}, | |
{ | |
id: 'comment4', | |
author: { username: 'user1', name: 'User 1' }, | |
comment: '.....' | |
}, | |
{ | |
id: 'comment5', | |
author: { username: 'user3', name: 'User 3' }, | |
comment: '.....' | |
} | |
] | |
} | |
// and repeat many times | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment