Skip to content

Instantly share code, notes, and snippets.

@AliRain

AliRain/store.js

Created Nov 17, 2019
Embed
What would you like to do?
const store = {
posts: [
{
id: 'p123',
title: 'Best React pattern in the world!',
author: 'a123',
comments: ['c123', 'c124'],
},
],
authors: [
{
id: 'a123',
name: 'Francesco',
email: 'name.surname@gmail.com',
posts: ['p123'],
},
],
comments: [
{
id: 'c123',
body: 'Best article ever!',
post: 'p123',
},
{
id: 'c124',
body: 'Best article ever ever!',
post: 'p123',
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment