preactjs / signals

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

Bug: signals aren't reactive on lazy imported components #301

Open waelbettayeb opened 1 year ago

waelbettayeb commented 1 year ago

Signals aren't reactive on lazy imported components on the react version. However, in the preact experiment suspense works fine.

englishisnotenglish commented 1 year ago

same issue

agileago commented 1 year ago

same +1

loicnestler commented 1 year ago

Any updates on this?

ywang1724 commented 1 year ago

same +1

andrewiggins commented 1 year ago

Could someone provide a minimal repro of the issue? Is this using react or preact package? What versions, etc. etc.

ywang1724 commented 1 year ago

Could someone provide a minimal repro of the issue? Is this using react or preact package? What versions, etc. etc.

hi~, @andrewiggins , you can reproduce it with this demo.

A few points:

Steps to reproduce:

  1. Run pnpm i && pnpm dev;
  2. Visit page: http://localhost:5173, and click the button;
  3. You can see this phenomenon: the signal named count, its value changes and the direct imported component follow the changes, but the lazy imported component did not follow.
XantreDev commented 11 months ago

420 it also is not working with forward refs