ember-local-storage
Installation
SKILL.md
ember-local-storage-decorator — Complete A3 Reference
Used in 32 A3 files. The @localStorage decorator provides a simple, reactive way to persist
UI state to the browser's localStorage. It integrates with Glimmer's tracking system so that
changes to localStorage-backed properties automatically trigger template re-renders.
Package: ember-local-storage-decorator
Import: import { localStorage } from 'ember-local-storage-decorator';
Core Concept
The @localStorage decorator creates a class property that:
- Reads its initial value from
localStorage(if a stored value exists) - Falls back to a default value if nothing is stored
- Writes to
localStoragewhenever the property is set - Is tracked (reactive) — template bindings update when the value changes
- Handles serialization/deserialization automatically (JSON.stringify/parse)