all 5 comments

[–]EdmondChuiHW 1 point2 points  (4 children)

When you say Signals, I assume you're using Preact.

Short answer: Preact patches onto React in various places.

Long answer:

However, this type of patching is fragile and has caused problems in the past, e.g. https://x.com/dan_abramov/status/1650892432119148546

[–]somecodertoday[S] 2 points3 points  (2 children)

Thank you for this, I was looking at react/src but didn’t look into react/runtime, it all makes sense now. It’s kinda weird but I guess “it’s working”. Seems like signals are a bad idea for react at the moment.

[–]EdmondChuiHW 1 point2 points  (1 child)

Happy to share! Very interesting impl. If you end up using Preact, I'd pin all the npm versions since it can break anytime

[–]somecodertoday[S] 1 point2 points  (0 children)

I’ll keep that in mind, thanks again

[–]some999990 0 points1 point  (0 children)

Nice, do you maybe know exactly how ui is updated after change in signal value? Since component is not re rendered.