Skip to content

Caveats about MDXProvider #1234

Answered by ChristianMurphy
lannonbr asked this question in Ideas
Discussion options

You must be logged in to vote

Welcome @lannonbr!
Thanks for taking time to think about patterns and anti-patterns, and doing a write up!

Something I've been thinking about is a possible anti-pattern of putting everything in the MDXProvider

Can you expand why you think this is an anti-pattern?
This seems it may be a personal preference.

as if you are using a component only on one or two MDX files

This isn't always the case, components can be used on many/all pages.

then for the rest of the site, those files would be possibly part of a bundle or the module dependency tree of any page that uses the MDXProvider

Possibly, but that would be by choice, code splitting is still supported https://create-react-app.dev/docs…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ChristianMurphy
Comment options

@lannonbr
Comment options

@ChristianMurphy
Comment options

@ChristianMurphy
Comment options

@lannonbr
Comment options

Answer selected by wooorm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants