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

Missing critical detail about @preact/signals-react when following installation guide for React #249

Open
jfreyheit opened this issue Sep 11, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jfreyheit
Copy link

@preact/signals v2 requires to add "import "@preact/signals/auto";" at top-level (this is done in Modular form's playground for React, which uses @preact/signals-react v2.2).

However, when following the installation guide, @preact/signals v2 is installed but there's no mention of the need to add this line of code. As a result, signals don't work properly.

We should either install @preact/signals v1 explicitly (through npm install @preact/signals-react@1"), or mention the required extra code.

@fabian-hiller
Copy link
Owner

fabian-hiller commented Sep 11, 2024

We use import "@preact/signals/auto"; as a quick fix in our playground. If I understand correctly, it is usually recommended to use Preact's Bable plugin instead.

@fabian-hiller fabian-hiller self-assigned this Sep 11, 2024
@fabian-hiller fabian-hiller added the documentation Improvements or additions to documentation label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants