Skip to content

can't use React Markdown with Next JS #1228

Discussion options

You must be logged in to vote

Welcome @mshaheeruddin! 👋
Sorry you ran into a spot of trouble.
As @wooorm notes in remarkjs/react-markdown#767 (comment), react-markdown doesn't leverage the useContext API.
It is highly unlikely, nearly impossible for react-markdown to be the root cause.

Some things to consider:

  • Are there any other components on the page which may be leveraging context?
  • Are you including multiple different versions of react on the page? (though dependencies, check your package lock file)
  • Are you sure your build tool is configured correctly?

Try searching the problem with your search engine of choice, and the keywords "TypeError: Cannot read properties of null (reading 'useContext') next"

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mshaheeruddin
Comment options

@ChristianMurphy
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