mdx-bundler
mdx-bundler copied to clipboard
Question: Warning: Do not call Hooks inside useEffect
-
mdx-bundler
version: 8.0.1 -
node
version: 17.4.0 -
yarn
version: 1.22.15
Relevant code or config
const Post = ({ code, frontmatter }) => {
const Component = useMemo(() => getMDXComponent(code), [code])
return (
<div className={styles.container}>
<h2>{frontmatter.title}</h2>
<Component />
</div>
)
}
What happened: When using mdx-bundler and styled components while Importing a custom component into mdx file that also imports a second custom component warnings are displayed in the console
is there a better way go about this to stop the warnings in the console ?

I'm getting the same, unsure how to solve it.
I think this a duplicate of issue (https://github.com/kentcdodds/mdx-bundler/issues/100)