Closed
Description
A lot of problems were solved in 0.3 rewrite but unfortunately the Store function name is now significant. It is used as the key to the related state partition. Because Stores are not registered anywhere, there are a couple of weird problems:
- Until some component references a Store, its data doesn't exist and it doesn't receive actions. Bad.
- If you add another Store with the same function name they'll refer to the same data. Oops.
We can't rely on the function identity because of hot reloading. The same Store will he represented by different functions over time.
I feel this calls for a "Store registry" where you'd assign a unique key to each Store. I can't pinpoint the API yet so let's leave this open. If you have suggestions please let me know.
Metadata
Assignees
Labels
No labels