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

Question: Warning: Do not call Hooks inside useEffect #153

Open
shaun-fitzgibbon opened this issue Feb 8, 2022 · 2 comments
Open

Question: Warning: Do not call Hooks inside useEffect #153

shaun-fitzgibbon opened this issue Feb 8, 2022 · 2 comments

Comments

@shaun-fitzgibbon
Copy link

shaun-fitzgibbon commented Feb 8, 2022

  • 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 ?

Screenshot 2022-02-08 at 15 24 03

@splunkmoody
Copy link

I'm getting the same, unsure how to solve it.

@Revilotom
Copy link

Revilotom commented Mar 3, 2022

I think this a duplicate of issue (#100)

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

No branches or pull requests

3 participants