From e31e91ef478c5b2e5c7ed0a059a38e0e4f588046 Mon Sep 17 00:00:00 2001 From: Kayce Basques Date: Mon, 28 Mar 2022 18:30:35 -0700 Subject: [PATCH] docs: add import React statement in JSX file example (#7050) --- .../docs/guides/markdown-features/markdown-features-react.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/guides/markdown-features/markdown-features-react.mdx b/website/docs/guides/markdown-features/markdown-features-react.mdx index 08530fd72e..230d5888ef 100644 --- a/website/docs/guides/markdown-features/markdown-features-react.mdx +++ b/website/docs/guides/markdown-features/markdown-features-react.mdx @@ -110,6 +110,8 @@ The `@site` alias points to your website's directory, usually where the `docusau While declaring components within Markdown is very convenient for simple cases, it becomes hard to maintain because of limited editor support, risks of parsing errors, and low reusability. Use a separate `.js` file when your component involves complex JS logic: ```jsx title="src/components/Highlight.js" +import React from 'react'; + export default function Highlight({children, color}) { return (