Menu

Introducing React Tweet
πŸ“°
0

Introducing React Tweet

Vercel NewsΒ·Luis AlvarezΒ·4 days ago
#ovW9VmCw
#vercel#react#tweet#twitter#embed#tweets
Reading 0:00
15s threshold

Embed tweets into your React application without sacrificing performance. Introducing react-tweet – embed tweets into any React application with a single line of code, without sacrificing performance. import { Tweet } from 'react-tweet' export default function Page ( ) { return < Tweet id = "1683920951807971329" / > } The resulting tweet – statically generated, no iframes required: Some benefits of using react-tweet : 35x less client-side JavaScript than the Twitter's Native embed Support for React Server Components Built-in data fetching and caching Works with any React framework – Next.js , Vite, and Create React App Link to heading Improving embeds with Server Components Historically, embedding tweets has required using Twitter's embedded iframe . This loads 560kb worth of client-side JavaScript, which slows site performance and causes layout shift. With react-tweet , you no longer need to use iframes.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More