milomg / reactively

MIT License
415 stars 23 forks source link

Why is get() used when processing effects #21

Closed jinyus closed 7 months ago

jinyus commented 7 months ago

https://github.com/modderme123/reactively/blob/9081fa4bf302a5f768962e0a4421a28d705439ff/packages/core/src/core.ts#L318

Wouldn't EffectQueue[i].updateIfNecessary() achieve the same behavior while doing a bit less work?

milomg commented 7 months ago

Yes. However, updateIfNecessary is currently internal (private), and the scheduler is a bit more external and (somewhat intentionally) cannot access all of the internals.