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

typo in documentation for MDX custom components leads to syntax error: unexpected token #33076

Closed
godmar opened this issue Jan 6, 2022 · 1 comment · Fixed by #33077
Closed
Labels
bug Issue was opened via the bug report template.

Comments

@godmar
Copy link

godmar commented Jan 6, 2022

Run next info (available from version 12.0.8 and up)

    Operating System:
      Platform: linux
      Arch: x64
      Version: #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021
    Binaries:
      Node: 16.13.1
      npm: 8.1.2
      Yarn: 1.22.10
      pnpm: N/A
    Relevant packages:
      next: 12.0.8-canary.19
      react: 17.0.2
      react-dom: 17.0.2

What version of Next.js are you using?

12.0.7 or canary

What version of Node.js are you using?

v16.13.1

What browser are you using?

Firefox

What operating system are you using?

Linux

How are you deploying your application?

testing

Describe the Bug

The documentation for custom components in MDX contains this example:

export default = ({ children }) => <MyLayoutComponent meta={meta}>{children}</MyLayoutComponent>

The = sign here may be a typo. It leads to a syntax error: unexpected token.

Expected Behavior

It should not lead to a syntax error.

To Reproduce

See this code sandbox.

@godmar godmar added the bug Issue was opened via the bug report template. label Jan 6, 2022
@godmar godmar changed the title typo in documentation typo in documentation for MDX custom components leads to syntax error: unexpected token Jan 6, 2022
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants