Problems upgrading to v2 #2340
-
Hello, I have taken over a project using mdx-jx and im trying to upgrade the dependencies but im having issues when it comes to mdx-js/loader because some of the methods used are outdated like the isMDXComponent function. In my project MDX files have a meta prop whith a Layout component imported and other data like titles. This is the file where problems occur (_app.js) `import React, { useState, useEffect } from 'react' const App = ({ Component, pageProps }) => {
}` And this is where the code creates some issues:
Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Welcome @jensug! 👋 |
Beta Was this translation helpful? Give feedback.
-
Hi Christian, Thanks for the reply and sorry for my lack of explaining. I have tried to follow the mirgration guide but failed to understood where i could have gone wrong, considering this project has fallen into my lap without the people who developed it being around anymore. The props consist of a meta component with strings of titles and such. It also includes a component Layout which is wrapped around the mdx content, which has been working fine until the upgrade. After upgrading to v2 the isMDXComponent function is obviously gone, so first thing would be how do i best change this? Any help is appriciated. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying to build a course/site structuring. The meta is just meta data for each course page mdx file containg titles and such. As well as the Layout component which is a setup i dont know why th eprevious developer chose. But i am not trying to add meta tags to the head. I think the isMDXComponet was used for cases where pages were not supposed to be wrapped in a Layout. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I migth have found a solution where i put |
Beta Was this translation helpful? Give feedback.
-
This post : #759 is looking at the same issue as i am. |
Beta Was this translation helpful? Give feedback.
I just created
recma-mdx-is-mdx-component
. You may want to use that for now.