Remove components from mdxprovider
Closed this issue · 2 comments
liza-veis commented
Components must be imported directly on the pages where they are used
kulak91 commented
There is no reason to remove this wrapper.
- MDX format imports can be inconvenient as there is no autocomplete feature and it's easy to make mistakes.
- Let's assume that the reason for this issue is performance. However, Gatsby uses Server-Side Rendering (SSR) to generate static HTML files for each page of your website during the build process. When a user requests a page, the server sends the pre-built static HTML file to the user's browser, rather than generating the HTML dynamically with each request. This approach can improve website performance and load times, as the user's browser can immediately display the pre-built HTML without having to wait for it to be generated.
- Consider the number of existing page imports. Adding 10 more components may not be convenient. What is the purpose of doing so?
- It would be more convenient to add a component in one place and use it on all pages.
What is the reasoning behind this matter?
liza-veis commented
The reasons for this issue:
- easier migration to other formats, I consider migrating to tsx format in future
- in the future they can add autocomplete feature