Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace public peek method with friend-style symbol
Peeking a value in contexts other than internal parts of the reactivity system itself tends very strongly to produce bugs, because it decouples consumers from the root state. (It is very, very tempting to wire your own caching on with a "peek", rather than using caching tools composed out of the core primitives, or to "be smarter" than the signal system.) For an interesting background discussion from the history of Glimmer's similar tag/signals system, see [here][github]. [github]: emberjs/rfcs#656 (comment) This doesn't *force* us to keep that, but it sets a nice precedent and means if we *do* introduce `peek()` as public behavior, we'll have a clear indicator that we need to make the choice explicitly.
- Loading branch information