Skip to content

Commit

Permalink
Merge pull request #20544 from NullVoxPopuli/sync-docs-with-in-editor…
Browse files Browse the repository at this point in the history
…-js-doc

Sync @cached guides-docs with in-editor JSDoc
  • Loading branch information
ef4 committed Sep 29, 2023
2 parents 5e14c82 + 25e9134 commit c521894
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,12 @@
the subsequent cache invalidations of the `@cached` properties who were
using this `trackedProp`.
As a reminder, do not use this piece of code inside a tracked getter,
as the dependency chain could lead to an infinite loop. Mutating an adjacent
property from a getter is not a good practice anyway, even with a caching
mechanism reducing reruns.
The cost of these edge-guards adds up to the trade-off calculation of using
a caching strategy, hence requiring a very sensitive and moderate approach
regarding performance.
Remember that setting tracked data should only be done during initialization,
or as the result of a user action. Setting tracked data during render
(such as in a getter), is not supported.
@method cached
@static
@for @glimmer/tracking
@public
*/
*/

0 comments on commit c521894

Please sign in to comment.