You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If solid() comes before react() in the integrations array in astro.config.ts, then it breaks react components with the following error 🙃
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
at Proxy.useState (project\node_modules\react\cjs\react.development.js:1622:21)
at __vite_ssr_exports__.default (/src/Component.tsx:8:51)
at Proxy.createComponent (project\node_modules\solid-js\dist\server.cjs:252:15)
at eval (project/node_modules/@astrojs/solid-js/server.js?v=715ab7fa:27:80)
at Proxy.renderToString (project\node_modules\solid-js\web\dist\server.cjs:250:86)
at renderToStaticMarkup (project/node_modules/@astrojs/solid-js/server.js?v=715ab7fa:27:37)
at Object.check (project/node_modules/@astrojs/solid-js/server.js?v=715ab7fa:10:19)
at Module.renderComponent (/node_modules/astro/dist/runtime/server/index.js:183:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Yep, looks like this will be the same bug. Closing this out as a duplicate of #3611 so we can prioritize that one based on it seeming to hit SolidJS + any other JSX framework
What version of
astro
are you using?1.0.0-beta.73
Are you using an SSR adapter? If so, which one?
none
What package manager are you using?
npm
What operating system are you using?
WIndows
Describe the Bug
If
solid()
comes beforereact()
in the integrations array inastro.config.ts
, then it breaks react components with the following error 🙃Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-e3lhnb?file=astro.config.mjs
Participation
The text was updated successfully, but these errors were encountered: