ember-tracked-local-storage is an Ember addon that synchronizes tracked properties with browser localStorage using Glimmer tracking, so mutations to stored values automatically trigger template re-renders. Version 2.0.1 is the latest stable release, requiring Ember.js 4.12+ and Node 18+. It uses the @trackedInLocalStorage decorator to wrap localStorage values and integrates with Ember's autotracking ecosystem. Unlike manual read/write patterns, this addon eliminates boilerplate and ensures reactivity without extra lifecycle hooks. Released under the adopted-ember-addons org with MIT license.
npm install ember-tracked-local-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a tracked property synced with localStorage; changing the value updates the template automatically.
Upgrade to Ember 4.12 or later, or use v1.x (which may have different constraints).
Upgrade to Node.js 18 or later.
Update to v2.x and remove any optional feature configurations.
Use only primitive-like values or ensure JSON round-trip compatibility. Do not store functions or symbols.
Pass a unique key argument to @trackedInLocalStorage('myCustomKey') to avoid collisions.Wrap usage with a guard: if (typeof localStorage !== 'undefined') { ... }Ensure import: import { trackedInLocalStorage } from 'ember-tracked-local-storage'; and use @trackedInLocalStorage() initialValue;Extend from Component (import Component from '@glimmer/component') or an Ember native class with @tracked.