Skip to content

Layout support via export default

Compare
Choose a tag to compare
@johno johno released this 08 Jun 15:42
· 1269 commits to main since this release

You can now export a component as the default and it will wrap the output JSX. This is great when your MDX file is the entrypoint like a standalone page.

import MyLayout from '../somewhere'

# hello world 

some text

export default (props) => <MyLayout {...props} title="test" />