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

Freeze issue introduced in version 10.25.0 of Preact with Mantine #4628

Closed
nicolasventer opened this issue Jan 9, 2025 · 4 comments · Fixed by preactjs/signals#630
Closed

Comments

@nicolasventer
Copy link

Hello,

The issue is still present even with the latest version of Preact.

Environment

  • Bun: 1.1.43
  • Windows

Describe the bug

In a web project with Preact, Preact signals, and Mantine with Select or SegmentedControl component, the page is blank and frozen after upgrading preact from 10.24.3 to 10.25.0.

To Reproduce

Here is a Github repository that demonstrates the issue: https://github.com/nicolasventer/Preact-Issue

Small description to reproduce the issue

  1. Create a vite project with React (not Preact).
  2. Make the alias for react and react-dom to preact/compat (see Preact documentation).
  3. Install [email protected] and @preact/signals
  4. Render the Select component of Mantine (do not forget the MantineProvider).
  5. Import @preact/signals and use it (e.g. const a = signal(0);).
  6. Run the project and there is no error.
  7. Upgrade preact to 10.25.0.
  8. Run the project and there is an error (page is blank frozen).

Expected behavior

The page should not be blank and frozen after upgrading preact to 10.25.0.


Can you please take a look at this issue? Thank you.

@rschristian
Copy link
Member

rschristian commented Jan 9, 2025

Please create a Vite Preact project, I don't think @vitejs/plugin-react will work correctly in a Preact project and very well may be the source of your issue.

You can use the following template on StackBlitz to get started: https://stackblitz.com/edit/create-preact-starter

@nicolasventer
Copy link
Author

I've just tried with Preact template there is still the issue.
Here are the branches : main_preact and preact_not_working

Here is a link with create preact starter: https://stackblitz.com/edit/create-preact-starter-wujgrgxr?file=src%2Findex.jsx
With 10.24.3, it is pretty long to start but it is working.
With 10.25.0, it stay blank.

(I'm not familiar with stackblitz, hope the link is working well)

@rschristian
Copy link
Member

rschristian commented Jan 10, 2025

That works, thanks! Helps maintainers a lot to start from a known working setup.

Definitely caused by #4560, might be reliant upon #4627 & preactjs/signals#630, have to test yet. Yep they'll correct this.

@JoviDeCroock
Copy link
Member

This will be fixed in preactjs/signals#630 you can read the pr for some detail if you like

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.

3 participants