Skip to content

Implement RFC #1071: overloaded tracked#21471

Merged
NullVoxPopuli merged 1 commit into
mainfrom
nvp/rfc-1071-tracked-overload
Jul 6, 2026
Merged

Implement RFC #1071: overloaded tracked#21471
NullVoxPopuli merged 1 commit into
mainfrom
nvp/rfc-1071-tracked-overload

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

RFC: emberjs/rfcs#1071

Todos:

Note

This todo list is an AI-generated summary of the RFC (I did manually check all the things tho)

  1. Core tracked function overload
    • Add a callable overload: tracked(initialValue, options?) returning a reactive container, alongside the existing decorator form.
    • Support options.equals — custom equality to control when the value is dirtied (default: "always dirty," matching current @Tracked).
    • Support options.description — internal label for debugging.
  2. Reactive container API (TrackedValue)
    • .value getter/setter (primary read/write).
    • .get() — read shorthand.
    • .set(value) — write shorthand.
    • .update(fn) — update via function without consuming/entangling the current value.
    • .freeze() — lock the value, optimizing it into a read-only reactive.
  3. TypeScript types
  4. Docs & ecosystem
    • Document the new non-class usage pattern and how it relates to / replaces community "cell" libraries.
    • Guidance on when to use function-form vs. decorator-form tracked.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0.3%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/template-{hash}.js 1.1 kB / 401 B -54%↓491 B / -49.4%↓203 B
./packages/shared-chunks/tracked-{hash}.js 6 kB / 1.8 kB 75%↑10.6 kB / 68%↑3.1 kB
./packages/shared-chunks/tracked-{hash}.js 841 B / 376 B 231%↑2.8 kB / 155%↑957 B
Total (Includes all files) 2.1 MB / 495.7 kB 0.3%↑2.1 MB / 0.4%↑497.4 kB

dist/prod   0.3%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/tracked-{hash}.js 3.8 kB / 1.2 kB 105%↑7.7 kB / 97%↑2.4 kB
./packages/shared-chunks/tracked-{hash}.js 841 B / 374 B 231%↑2.8 kB / 163%↑982 B
Total (Includes all files) 1.9 MB / 453 kB 0.3%↑1.9 MB / 0.4%↑454.7 kB

smoke-tests/v2-app-template/dist   0.3%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 313.1 kB / 83.9 kB 0.3%↑314 kB / 0.3%↑84.2 kB
Total (Includes all files) 348.7 kB / 94.9 kB 0.3%↑349.7 kB / 0.3%↑95.2 kB

smoke-tests/v2-app-hello-world-template/dist   0.6%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 152.5 kB / 42.2 kB 0.6%↑153.4 kB / 0.7%↑42.5 kB
Total (Includes all files) 152.9 kB / 42.3 kB 0.6%↑153.8 kB / 0.7%↑42.6 kB

🤖 This report was automatically generated by wyvox/pkg-size

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/rfc-1071-tracked-overload branch from 8e54bbc to 22ece72 Compare July 1, 2026 20:38

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once we move to typedoc, we can have relevant docs per overloaded signature, rather than a giant one for for everything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implementation here

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review July 1, 2026 20:58
@NullVoxPopuli NullVoxPopuli changed the title Implement RFC #1071: overloaded tracked [FEATURE] Implement RFC #1071: overloaded tracked Jul 6, 2026
@NullVoxPopuli NullVoxPopuli changed the title [FEATURE] Implement RFC #1071: overloaded tracked Implement RFC #1071: overloaded tracked Jul 6, 2026
@NullVoxPopuli NullVoxPopuli merged commit 58c2182 into main Jul 6, 2026
47 of 48 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/rfc-1071-tracked-overload branch July 6, 2026 17:50
@kategengler

Copy link
Copy Markdown
Member

emberjs/rfcs#1202 needs to get to Ready for Release before this goes out marked public

@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

its an existing API, so it's already public. I can gate the new behavior and delete docs tho

@kategengler

Copy link
Copy Markdown
Member

Alternatively, we just get the RFC there before the next 4 weeks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants