0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
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