Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Example using Store instead of ReduceStore #448

Closed
spacedarcy opened this issue Mar 27, 2018 · 1 comment
Closed

Example using Store instead of ReduceStore #448

spacedarcy opened this issue Mar 27, 2018 · 1 comment

Comments

@spacedarcy
Copy link

Hi, just wondering why there aren't any examples using the plain Store class, or an explanation of the differences between it and ReduceStore.

@kyldvs
Copy link
Contributor

kyldvs commented Mar 28, 2018

That is because we strongly recommend using ReduceStore instead of the plain Store. The Store class can be thought of as utilities to help implement ReduceStore. Store provides functionality like connecting to a dispatcher, adding listeners, and emitting changes.

The only example I would recommend for using Store is the implementation of ReduceStore itself: https://github.com/facebook/flux/blob/master/src/stores/FluxReduceStore.js

@kyldvs kyldvs closed this as completed Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants