Skip to content

Conversation

@dannysheridan
Copy link
Member

@dannysheridan dannysheridan commented Nov 25, 2025

Summary

Adds documentation to the custom React components page addressing common user questions about file organization and capabilities. This was prompted by a user question in Slack asking about accessing other files, creating separate JS/CSS files, adding SVG assets, and making API calls with API keys.

New sections added:

  • Importing files and assets - CSS imports, JS/TS module imports, SVG and image asset usage
  • Making API calls - Client-side fetch example with security warning about API keys

Also adds a changelog entry for 2025-11-25.

Review & Testing Checklist for Human

  • Verify technical accuracy of import patterns - The examples show standard React import patterns but should be verified against Fern's actual MDX component bundling behavior (CSS imports, SVG imports, module resolution)
  • Validate mdx-components configuration guidance - The Note suggests adding utility and asset directories to mdx-components in docs.yml - confirm this is the correct approach
  • Review API key security guidance - The suggestion to "pass keys as props from your MDX file, where you can use environment variables" may be misleading if MDX doesn't have access to server-side env vars

Recommended test plan: Create a test Fern project with a custom React component that imports a CSS file, a utility module, and an SVG asset to verify the documented patterns work as described.

Local Testing

Documentation renders correctly in local dev server:

Local testing recording

View original video (rec-638680df7a8d45c79e4032ac2c5f9ca9-edited.mp4)

Notes

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants