Hi Rocco, here is a checklist for your sample state docs.
Sample State
[ ] State shape is flat!
[ ] State's keys are camelCased
[ ] All keys within the values in the state are accessible in the schema
[ ] Correctly formatted
[ ] Sample state is rendered with triple backticks, and the language ```javascript...```). This will display the state as a code block instead of a giant line of text
[ ] Top level slices
[ ] entities
[ ] session
[ ] errors (here or in ui)
[ ] ui (if needed)
[ ] Should NOT have nested slices, aka comments inside of posts
Some info from other tables is ok, for instance:
the author username and imageurl for a post. basically any info that the user can't change
like count and a boolean on whether the user likes the post instead of a likes slice
be sure to include all relevant columns that you would expect to display on a page, ex: reviews should have id, title, rating, body, value, quality, durabilty, author_name, product_id, and maybe even created_at/updated_at. Same thing goes for the other slices of state, the question you should ask is basically, what information do I need for this?
You will likely also need a slice of state for cart_items
Hi Rocco, here is a checklist for your sample state docs.
Sample State
```javascript...```
). This will display the state as a code block instead of a giant line of textentities
session
errors
(here or inui
)ui
(if needed)comments
inside ofposts