Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The implementation involves unsafe monkey-patching:

1. For React, a hook is injected into every single component (!) regardless of whether it uses signals or not via __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.

2. For React, React.createElement is patched so that it can render signal values as Text nodes.

3. For Preact, they claim it's using a "pluggable renderer", yet they monkey-patch the global shouldComponentUpdate (and they don't call the old one so they break other patchy libraries)

[1] - https://github.com/preactjs/signals/blob/d25e8bac09c94ed3bad...

[2] - https://github.com/preactjs/signals/blob/d25e8bac09c94ed3bad...

[3] - https://github.com/preactjs/signals/blob/d25e8bac09c94ed3bad...



For Preact, there is a TODO pointing to [1] which was merged in 10.10.3, so hopefully that can be fixed soon?

[1] https://github.com/preactjs/preact/pull/3671


Update: it completely breaks with React 18 and strict mode enabled - https://github.com/preactjs/signals/issues/70


Does someone know why the counter for this issue is at "70", but the repo only shows "21" issues in total? Maybe there are deleted issues that are not part of the total counter?

https://github.com/preactjs/signals/issues?q=is%3Aissue


No, that's because GitHub uses the same number for both issues and pull requests. We did about 70 pull requests. You can verify that yourself by going on an issue and incrementing/decrementing the number until you hit a PR at which point you'll be redirected.


Good catch. If this were an internal library, it wouldn't have passed code review.


the best vocabulary to describe the monkey patching react ecosystem




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: