preactjs / signals

Manage state with style in every framework
https://preactjs.com/blog/introducing-signals/
MIT License
3.81k stars 95 forks source link

Trying to understand preact/signals’ private options hooks usage #187

Closed CreepGin closed 2 years ago

CreepGin commented 2 years ago

Basically, I’m trying to understand how or where the hook options.__b gets called. Doing a stack trace does show that it’s called when options._diff gets called. But I fail to see the code responsible for setting that up.

I’m doing some tooling involving preact/signals, so I’m trying to understand some of the internals. Hope someone can shed some light for me. Thanks!

CreepGin commented 2 years ago

Figured it out =) There were a lot of code changes to both preact and preact/signals lately that keeping track of the source code had been a challenge. Once I updated everything again, things became more apparent.