Géry Debongnie
9ee85e220b
[FIX] store: unobserve detached objects
...
closes #27
2019-04-15 10:43:50 +02:00
Géry Debongnie
7b87470760
[IMP] store: connect function takes hash function in param
...
With this commit, we can now decides precisely if a component should be
rerendered, by using a hash function.
By default, the hash function will deep observe each store element
coming from the result of the mapStateToProps.
closes #24
2019-04-15 10:43:35 +02:00
Géry Debongnie
f5bbf25d4f
[IMP] store: add deep tracking for changes
...
This is only at the level of the store currently. To be useful, we need
to work on the 'connect' function.
2019-04-14 21:24:54 +02:00
Géry Debongnie
4ea0875fd9
[REF] store: namespace rev under __owl__ name
2019-04-14 11:27:02 +02:00
Géry Debongnie
a0f0a24d1d
[REF] component: use __owl__ as metadata key
2019-04-13 14:14:34 +02:00
Géry Debongnie
caed076f2a
[FIX] store: properly handle null values
2019-04-12 21:07:12 +02:00
Géry Debongnie
4f1d976206
[FIX] store: properly observe all array methods
2019-04-12 13:03:25 +02:00
Géry Debongnie
8ca806eb28
[IMP] store: make sure set function works with arrays
2019-04-12 12:45:44 +02:00
Géry Debongnie
e0608aa7fd
[IMP] store: propagate 'set' function to commit parameters
2019-04-12 12:42:14 +02:00
Géry Debongnie
111080fdbf
[FIX] store: observer array values recursively
2019-04-12 12:25:22 +02:00
Géry Debongnie
ab12ac8a9f
[IMP] store: properly handle already observed state
2019-04-12 12:17:16 +02:00
Géry Debongnie
63069d96a5
fix: properly observe recursively new values
2019-04-12 12:08:31 +02:00
Géry Debongnie
f1cc32de8f
imp: prevent store state change outside a mutation
2019-04-12 12:05:06 +02:00
Géry Debongnie
03511ce9ea
ref: reorganize store (based on different principles)
2019-04-12 11:57:29 +02:00
Géry Debongnie
d49f5670fe
ref: better store internal organization
2019-04-11 13:02:32 +02:00
Géry Debongnie
816ffe1b44
imp: store dispatch functions can be synchronized
2019-04-09 13:16:22 +02:00
Géry Debongnie
c10b84cd99
ref: move magify function from utils to store
2019-04-09 10:09:29 +02:00
Géry Debongnie
bf4cbaea33
imp: unskip test, add new test
2019-04-09 09:14:22 +02:00
Alexandre Kühn
cde85269fd
imp: make store reactive (observe state and react to changes)
...
This is a pretty big change, yet still not complete.
2019-04-08 23:11:38 +02:00
Alexandre Kühn
3340401f54
imp: give reference to dispatch function in actions
2019-04-08 23:11:32 +02:00
Alexandre Kühn
7027ff1eb6
imp: add env to store dispatch
...
This is useful to allow actions to use specific environment methods.
For example, one might want to add a rpc method to the environment.
2019-04-08 23:04:27 +02:00
Géry Debongnie
f2fc20f8e3
fix: connected components should recompute store props properly
2019-04-04 16:01:09 +02:00
Géry Debongnie
a86d0b5b02
imp: store connect: mapStateToProps receive ownProps
2019-04-02 14:23:40 +02:00
Alexandre Kühn
e7a4ad99de
[FIX] connected child components with custom hooks
2019-04-01 14:44:53 +02:00
Géry Debongnie
d81e5d8f4f
imp: add debug mode to store
2019-03-22 10:56:34 +01:00
Géry Debongnie
d48cb5aae4
imp: work on store, refactor, improve todoapp
2019-03-22 10:47:59 +01:00
Géry Debongnie
8e82a8612a
small cleanup of the store
2019-03-21 09:11:44 +01:00
Géry Debongnie
c9796e6bdc
add store class to core
2019-03-20 11:49:41 +01:00