You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But unlike regular React, you can't import components from every MDX file. Re-usable components can only be referenced from MDX files within the `snippets` folder.
184
+
</Warning>
185
+
184
186
After importing the component, you can use it in your MDX files like this:
185
187
186
188
```jsx
187
189
<ColorGenerator />
188
190
```
189
191
190
-
But unlike regular React, you can't import components from every MDX file. Re-usable components can only be referenced from MDX files within the `snippets` folder.
191
-
192
-
Learn more about this limitation in the [reusable snippets](/reusable-snippets) documentation.
192
+
Learn more about [reusable snippets](/reusable-snippets).
193
193
194
194
## Considerations
195
195
@@ -201,14 +201,10 @@ Learn more about this limitation in the [reusable snippets](/reusable-snippets)
201
201
-**Initial Load**: Visitors may experience a flash of loading content before components render
202
202
-**Accessibility**: Ensure dynamic content changes are announced to screen readers
203
203
</Accordion>
204
-
205
204
<Accordiontitle="Performance Best Practices">
206
205
-**Optimize Dependency Arrays**: Include only necessary dependencies in your `useEffect` dependency arrays
207
206
-**Memoize Complex Calculations**: Use `useMemo` or `useCallback` for expensive operations
208
207
-**Reduce Re-renders**: Break large components into smaller ones to prevent cascading re-renders
209
208
-**Lazy Loading**: Consider lazy loading complex components to improve initial page load time
0 commit comments