Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
waelbettayeb opened this issue Feb 8, 2023 · 7 comments · May be fixed by #342
Open

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

waelbettayeb opened this issue Feb 8, 2023 · 7 comments · May be fixed by #342

Comments

@waelbettayeb
Copy link

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

@englishisnotenglish
Copy link

same issue

@agileago
Copy link

agileago commented Mar 1, 2023

same +1

@loicnestler
Copy link

Any updates on this?

@ywang1724
Copy link

same +1

@andrewiggins
Copy link
Member

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

@ywang1724
Copy link

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:

  • react@18.2.0
  • @preact/signals-react@1.2.2

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
Copy link
Contributor

#420 it also is not working with forward refs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants