Rich Harris
645f9e3894
oops, we need that argument
2018-08-25 07:06:46 -04:00
Rich Harris
c2f0ca3e2e
alternative approach to #1520
2018-08-25 06:58:31 -04:00
Jacob Wright
2c24c36120
Allows fragment updates to happen after state updates
...
Proposed fix for #1520 . Provides a starting point for discussion.
2018-08-23 11:56:11 -06:00
Rich Harris
bb57f2bd50
make dirty local to the for loop
2018-05-03 21:11:12 -04:00
Brian Takita
a8d3e93269
Declaring variable dirty
.
...
Fixes https://github.com/sveltejs/svelte/issues/1415
2018-05-03 20:23:18 -04:00
Rich Harris
c8d55aa90a
update state with new computed properties
2018-05-02 21:31:38 -04:00
Rich Harris
367f062e4e
fix and simplify cycle detection
2018-05-02 20:57:46 -04:00
Rich Harris
968b7956a4
on second thoughts, cycles is a better name still
2018-05-01 22:31:43 -04:00
Rich Harris
9d6d996866
alternative approach to #1399
2018-05-01 22:27:18 -04:00
Brian Takita
058e1bddf3
Added key & rootKey into 'Cyclical dependency detected' error message
2018-05-01 21:28:37 -04:00
Brian Takita
4d8090aa15
Fix https://github.com/sveltejs/svelte/issues/1399
...
Store - Cyclical Dependency Detected when child computed property defined before parent & grand-parent computed proprety
2018-05-01 21:20:05 -04:00
Rich Harris
7b40fed197
remove unused store methods
2018-04-15 18:07:53 -04:00
Rich Harris
424bb1a5de
-> v1.63.1
2018-04-15 16:32:28 -04:00
Rich Harris
20b940a73a
deprecate store.onchange
2018-04-15 13:30:16 -04:00
Rich Harris
c1573dbf2c
implement onstate and onupdate
2018-04-15 13:09:59 -04:00
Luke Edwards
69ba60b840
fix Store usage
2018-03-27 13:21:29 -07:00
Rich Harris
957179fc7f
use local this
variable instead of .bind
2018-02-23 08:47:49 -05:00
Gareth Oates
7d44b181f2
this._changeHandlers was undefined when calling cancel()
2018-02-16 10:58:18 +01:00
Rich Harris
1b599bd57b
put _differs on prototype, remove runtime option
2018-02-11 17:32:48 -05:00
Jacob Wright
d2f8e472a5
Add support to computed and store for immutable structures
...
Adds optional performance support for apps using an immutable data structure such as redux. Adds the `immutable` boolean option for compile and an `immutable` option to store as well. When these options are used, computed will not recompute if the object has not changed. If your data structure is not immutable you should not use this as svelte cannot know if a mutation was made on objects.
This PR also adds support for Dates and NaN values so computed properties will not recompute if a date has not changed or a value did not change from NaN.
This closes out these issues:
* https://github.com/sveltejs/svelte/issues/1146
* https://github.com/sveltejs/svelte/issues/1161
This is my first PR for Svelte. Any feedback would be appreciated!
2018-02-08 21:04:29 -07:00
Rich Harris
e3836dab46
shorter error message, remove ES6 template string
2017-11-27 07:43:30 -05:00
Rich Harris
d479224067
prevent cyclical store computations, and computation duplication
2017-11-27 07:21:06 -05:00
Rich Harris
d5d1eccb28
remove combineStores
2017-11-25 17:12:10 -05:00
Rich Harris
96eac06e2d
fix ES5 scoping bug
2017-11-25 14:23:57 -05:00
Rich Harris
7779f26f7f
remove ES2015+ from store.js
2017-11-25 14:09:41 -05:00
Rich Harris
adc248f639
make target store optional
2017-11-25 14:02:24 -05:00
Rich Harris
47547ed0ab
better implementation of computed properties
2017-11-25 13:55:20 -05:00
Rich Harris
a669dbfcd4
add combineStores function
2017-11-25 13:21:55 -05:00
Rich Harris
f23c886b6a
computed properties
2017-11-25 12:07:28 -05:00
Rich Harris
2705532cb0
add _init method
2017-11-24 13:56:32 -05:00
Rich Harris
d0e5098ea6
implement Store
2017-11-24 12:50:12 -05:00