Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jingc
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
jingc
12y ago
The stores contain the data, but they also include the logic for updating that data. For example, a store of all the comments would also subscribe to events for new comments and add them into the comment thread at the correct location. We&#
2.
▲
by
jingc
12y ago
Agreed, we found that property really nice too - optimistic updating and rolling back on error were similarly easy
3.
▲
by
jingc
12y ago
We do still use React state, especially for view state like whether a piece of text is expanded or whether the viewer has toggled the grid or list view on a table. But as you said, most of our data is pulled into a store layer that doesn&#x
4.
▲
by
jingc
12y ago
Yup, we've used it that way, and it's easy to implement due to the fact that all changes are expressed as a payload object, which allows you to serialize actions. Optimistic actions (showing the Like when the server hasn't co
5.
▲
by
jingc
12y ago
Thanks lhorie, it's great to hear that you've come to similar conclusions. I found that https://tech.dropbox.com/2014/04/building-carousel-part-i-ho... also described similar concepts, which is really en