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?]: createEffect only run once when app is wrapped in <Suspense /> #990

Closed
2 tasks done
lirbank opened this issue Aug 10, 2023 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@lirbank
Copy link

lirbank commented Aug 10, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

In the example app https://github.com/lirbank/solid-suspense I have disabled <Suspense /> in src/root.tsx.

If I enable <Suspense /> the the createEffect in src/routes/index.tsx never re-run so the data is never persisted to localStorage.

Expected behavior 🤔

The createEffect should re-run when ever data in the createStore changes when <Suspense /> is enabled.

Steps to reproduce 🕹

Steps:

  1. Clone https://github.com/lirbank/solid-suspense (I have disabled <Suspense /> in src/root.tsx
  2. Start the app, click the "add" button - works correctly
  3. Open src/root.tsx and enable <Suspense />
  4. Click the "add" button - createEffect only runs once and localStorage is never updated

Context 🔦

create-solid version 0.2.30

Welcome to the SolidStart setup wizard!

There are definitely bugs and some feature might not work yet.
If you encounter an issue, have a look at https://github.com/solidjs/solid-start/issues and open a new one, if it is not already tracked.

✔ Where do you want to create the app? … solid-suspense
✔ Which template do you want to use? › bare
✔ Server Side Rendering? … no
✔ Use TypeScript? … yes

Your environment 🌎

No response

@lirbank lirbank added the bug Something isn't working label Aug 10, 2023
@lirbank
Copy link
Author

lirbank commented Aug 10, 2023

Related to solidjs/solid#1848
Fixed in "solid-js": "1.7.11",

@lirbank lirbank closed this as completed Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant