dai-shi / use-signals

An experimental React hook for TC39 signals
MIT License
319 stars 6 forks source link

How this compares to non-standard solutions like https://github.com/preactjs/signals for a React app? #6

Open rogerpadilla opened 4 months ago

rogerpadilla commented 4 months ago

I know the approach of use-signals is try to micmic the standard spec, but looking more to know which one should be using right now if including Signals in React applications.

E.g. so far I have configured the plugin mentioned above for my existing React app, and also added @preact/signals-react-transform to my Vite config which will automatically transform my components (using Signals) to be reactive.

Can you please elaborate in the differences/pros/cons you see for every approach?

Thanks for implementing this and sharing it!

dai-shi commented 4 months ago

It depends on what you expect for "signals". Let me put some of my resources: