-
Is this expected? I'd like to use |
Beta Was this translation helpful? Give feedback.
Answered by
wooorm
Jul 5, 2022
Replies: 1 comment
-
Yes. Import/export statements are a level higher than the content. You can’t pass props to them. To illustrate, say this is
And this is the code using it: import {default as MDXContent, a} from './path/to/file.mdx'
// `MDXContent` is a function, so sure, we could pass props to them and set `b`.
// But `a` is the value `1`, it’s already exported, we can’t change that. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gutenye
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes. Import/export statements are a level higher than the content. You can’t pass props to them. To illustrate, say this is
file.mdx
:And this is the code using it: