Skip to content

Can't get MDX working with Next JS 14.2.22 app router #1650

Closed Answered by amannn
ynamite asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at your code sample, the issue seems to be that you're calling the hook useTranslations in an async component. Hooks are generally not supported in async components. You can resolve this, by switching to await getTranslations.

The latest version of eslint-plugin-react-hooks also includes a check to avoid this error.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ynamite
Comment options

You must be logged in to vote
0 replies
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