Replace the MDX Content Wrapper with an MDXProvider in Gatsby MDX

InstructorChris Biscardi

Share this video with your friends

Send Tweet

MDX content has a root element called wrapper. This element is a React.Fragment by default which can lead to some warnings if you pass props to the MDX component generated from a file, like gatsby-mdx's src/pages support does. Here's how to fix that.