-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
React invalid hook call warning while using mdx and react integrations at the same time #8317
Comments
I have checked #4220, but using |
Also, if in export default defineConfig({
integrations: [react(), mdx()]
}); the warning will disappear. |
Thanks! The |
@matthewp, this issue appears to be back. My config looks like this:
Using
Removing the mdx integration the warning goes away. |
This is happening to me too and my |
Astro info
What browser are you using?
Safari
Describe the Bug
When opening
localhost:4321/
in my browser, the dev server will log the following error, if we use both the@astrojs/mdx
and@astrojs/react
integrations.There will be no warning if I first build the project and run
astro preview
.After some digging, I have found that this is related to the
astro:jsx
renderer. When running this renderer'scheck
function, the warning will be logged. In addition, removing the@astrojs/mdx
integration also fixes this.What's the expected result?
It would be better if no warning is shown in the console during development.
Link to Minimal Reproducible Example
https://github.com/rk-terence/mre-invalid-hook-call-in-react
Participation
The text was updated successfully, but these errors were encountered: