Closed ProchaLu closed 7 months ago
Hi @kentcdodds, can you check out the PR when you have a moment. Your feedback would be great and maybe the PR will be merged. Thanks!
This is not a very common usecase though
@kentcdodds Just ran across this - do you think it's not common? My gut feel says that it would be the most common use case.
Currently when you have the following simple setup, it breaks:
1.mdx
import Partial from './2.mdx'
<Partial />
2.mdx
# Partial content
Some content that is shared across multiple pages
<SomeComponentFromProvider /> {/* 💥 */}
🤷♂️ I'd still like the docs for this moved down.
@kentcdodds , thanks for the review! I changed the position and moved it before the "Known Issues" section
:tada: This PR is included in version 10.0.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Closes #195
What:
This pull request adds a Readme guide to make sure custom components are accessible in nested MDX files.
Why:
With the current behaviour, passing custom components to nested MDX files is leading to unexpected rendering issues. This solution and Readme guide allows to share custom components across the MDX structure.
How:
MDXProvider
from@mdx-js/react
Checklist: