diff --git a/docs/docs/using-mdx.mdx b/docs/docs/using-mdx.mdx index 830f600db..de7976c82 100644 --- a/docs/docs/using-mdx.mdx +++ b/docs/docs/using-mdx.mdx @@ -1,3 +1,5 @@ +import {Note} from '../_component/note.jsx' + export const info = { author: [ {github: 'wooorm', name: 'Titus Wormer', twitter: 'wooorm'} @@ -206,6 +208,13 @@ console.log(React.createElement(Example, {name: 'Venus', year: 2021})) console.log() ``` + + **Note**: + Users of the MDX VS Code extension can add type + checking of `props` with a JSDoc comment. + See [`mdx-js/mdx-analyzer`][mdx-analyzer] for more info. + + ### Components There is one special prop: `components`. @@ -325,6 +334,13 @@ as follows: * Otherwise, if it starts with a lowercase, it’s a literal (`` -> `h('a')`) * Otherwise, it’s an identifier (`` -> `h(A)`), which means a component `A` + + **Note**: + Users of the MDX VS Code extension can add type + checking of provided and passed components with a JSDoc comment. + See [`mdx-js/mdx-analyzer`][mdx-analyzer] for more info. + + ### Layout There is one special component: the layout. @@ -534,6 +550,8 @@ providers: pass components explicitly. [what]: /docs/what-is-mdx/ +[mdx-analyzer]: https://github.com/mdx-js/mdx-analyzer + [mdx-react]: /packages/react/ [mdx-preact]: /packages/preact/