mdx-js / specification

MDX language and AST definitions
https://specification.mdx.now.sh
MIT License
264 stars 11 forks source link

Props #6

Closed jamesknelson closed 5 years ago

jamesknelson commented 6 years ago

It would be nice to define how props are passed to components.

MDXC supports params paramName at the top of the file, along with imports/exports. I think ideally, it'd look more like props { destructured, props, ...etc }.

ticky commented 6 years ago

Markdown Component Loader also handles this by giving Markdown components access to the entire props object.

johno commented 5 years ago

Going to go ahead and close this since props are exposed to the global scope and can be accessed in JSX blocks. Thanks for opening!