Skip to content

MDX error messages #1775

Answered by wooorm
willcrichton asked this question in General
Oct 24, 2021 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

I'm evaluating MDX for potential use as an alternative syntax

What is the other syntax?

From what I understand […] MDX will resolve Foo to foo.Foo, while Bar will just be assumed to be an unresolved/external global and left as is.

Not exactly. See How MDX works for the output. Bar can be passed or provided.

Either during the MDX pass to flag such issues, or better source-mapping so React can point to a specific spot where the error arises?

Unfortunately it is not known at compile time whether this is an issue.


In MDX 1, there is an error. It works something like this:

const _components = Object.assign({
  p: "p",
  // …
  Bar: () => console.warn('`Bar` is not defined')
}, props.com…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@willcrichton
Comment options

@ChristianMurphy
Comment options

@willcrichton
Comment options

Comment options

You must be logged in to vote
5 replies
@willcrichton
Comment options

@wooorm
Comment options

@wooorm
Comment options

@willcrichton
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
Labels
None yet
3 participants