From 25e91340ad56031e3d5b20b3ab2ddc2ce73d21cc Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 8 Sep 2023 16:28:44 -0400 Subject: [PATCH] Sync @cached guides-docs with in-editor JSDoc --- .../-internals/glimmer/lib/glimmer-tracking-docs.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts b/packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts index 2729fcd3b5a..77e4448422c 100644 --- a/packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts +++ b/packages/@ember/-internals/glimmer/lib/glimmer-tracking-docs.ts @@ -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 -*/ + */