diff --git a/react-components.mdx b/react-components.mdx index 4145ef7ea..3bca2edca 100644 --- a/react-components.mdx +++ b/react-components.mdx @@ -94,6 +94,10 @@ The counter renders as an interactive React component. You can import components from your `snippets` folder. Unlike regular React, you cannot import components from every `MDX` file. Reusable components must be referenced from files within the `snippets` folder. Learn more about [reusable snippets](/reusable-snippets). + + **Important limitation**: You cannot import a snippet into another snippet. This means you cannot import React components from one snippet file into another snippet file. Snippets can only be imported into regular MDX pages. + + ### Example This example declares a `ColorGenerator` component that uses multiple React hooks and then uses it in an `MDX` file. diff --git a/reusable-snippets.mdx b/reusable-snippets.mdx index fc17d584b..2c78bc929 100644 --- a/reusable-snippets.mdx +++ b/reusable-snippets.mdx @@ -13,6 +13,10 @@ should create a custom snippet to keep your content in sync. **Pre-condition**: You must create your snippet file in the `snippets` directory in order for the import to work. + + **Important limitation**: You cannot import a snippet into another snippet. Snippets can only be imported into regular MDX pages, not into other files within the `snippets` directory. + + Any page in the `snippets` directory will be treated as a snippet and will not be rendered into a standalone page. If you want to create a standalone page from the snippet, import the snippet into another file and call it as a