Embed RSS Feed on React
AdvancedIntegrate RSS feeds into your React application using our widget or API.
Step-by-Step Guide
- 1Create your RSS widget in the Brevofeed dashboard
- 2Install the embed script or use the API directly
- 3For quick setup: add the script tag to your index.html
- 4For full control: use the Brevofeed API to fetch feed data and render custom components
Code Snippet
// Option 1: Script tag in index.html
// <script src="https://brevofeed.com/widget/YOUR_EMBED_KEY.js"></script>
// Option 2: React component with API
import { useEffect, useState } from 'react';
function RssFeed({ feedId }: { feedId: string }) {
const [items, setItems] = useState([]);
useEffect(() => {
fetch(`https://brevofeed.com/api/feeds/${feedId}/items`)
.then(res => res.json())
.then(data => setItems(data.items));
}, [feedId]);
return (
<ul>
{items.map((item: any) => (
<li key={item.guid}>
<a href={item.link}>{item.title}</a>
</li>
))}
</ul>
);
}Tips for React
- ✓Use the API for full control over rendering
- ✓The script tag approach works but isn't ideal for React's virtual DOM
- ✓API access requires a Pro plan or higher
Frequently Asked Questions
Is there a React SDK for Brevofeed?
Not yet, but our REST API works great with React. Use fetch or any HTTP client to get feed data and render it with your own components.
Start Embedding RSS Feeds
Create your first RSS widget in under a minute. No credit card required.
Get Started Free