This repository was archived by the owner on Mar 15, 2022. It is now read-only.
v2.0.0
Added
- Added support for persisted stores. (#55)
Spruce.store('form', {
name: 'Ryan'
}, persisted = true)
Persisted stores use local storage to save state between page loads. On load, it will retrieve the state from a local storage key __spruce:${name}
.
When a persisted store is updated, it will push the changes to local storage under that same key by running the object through JSON.stringify()
.
Fixed
- Fixed problem with watchers ending up in an infinite loop.
Removed
- Removed all event bus related methods:
Spruce.on()
,Spruce.off()
,Spruce.emit()
andSpruce.once()
. (#48)