Mdx: Using custom "wrapper" component does not work in v1

Created on 21 Mar 2019  路  2Comments  路  Source: mdx-js/mdx

Subject of the issue

You're not able to set a custom wrapper component in v1.

Your environment

  • MacOS 10.14.3
  • "@mdx-js/mdx": "^1.0.0-alpha.7" and "@mdx-js/tag": "^1.0.0-alpha.6"
  • Node v10

Steps to reproduce

Add a MDXProvider and set the wrapper to be something other than default. Eg:

export default function App({ children }) {
  return (
    <MDXProvider components={{ wrapper: React.Fragment }}>
        {children}
    </MDXProvider>
  )
}

Expected behaviour

I now expect that the wrapper component would be a Fragment ie. no html tag

Actual behaviour

The output would be something like <div name="wrapper"><!-- all other content --></div>

馃悰 typbug

Most helpful comment

Yeah can confirm that it's fixed with the latest release 馃帀

All 2 comments

I _believe_ this should be fixed with #479 which is now released as 1.0.0-alpha.8.

Yeah can confirm that it's fixed with the latest release 馃帀

Was this page helpful?
0 / 5 - 0 ratings