Skip to content

How can I improve my setup? (currently doing client side rendering when I know there's a better way) #2202

Answered by wooorm
colinsteidtmann asked this question in Q&A
Discussion options

You must be logged in to vote

Did you see this guide?: https://mdxjs.com/guides/mdx-on-demand/

For the first problem, hooks, in Next.js: perhaps you can do this without a hook: these getStaticProps things from Next.js can run async things.

Second, webpack modules, indeed: if you have MDX files that have further imports, we don‘t bundle those for you. This project only compiles MDX files to JS. It doesn’t bundle further files.

Third, on the react provider: you likely don’t need providers. They probably only make things slower. You can pass components. https://mdxjs.com/docs/using-mdx/#mdx-provider

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@colinsteidtmann
Comment options

@colinsteidtmann
Comment options

@colinsteidtmann
Comment options

@wooorm
Comment options

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