7 comments

[ 280 ms ] story [ 1584 ms ] thread
Twitter's embedding SDK is horribly slow and inefficient.

For embedding tweets on your site (including SSR), this solution is 10-100x faster!

This project packages up the awesome work that Vercel has done into a set of easy-to-use NPM packages.

To really see the difference in practice, here's a page with a bunch of embedded tweets using the official Twitter iframe SDK https://test-suite-trillcyborg-xyz-super-static-ei3ayge5v.ve... and here's the optimized version using react-static-tweets https://test-suite-trillcyborg-xyz-super-static-m9ptjhkfv.ve...

Also, this project is already being used in production by https://super.so

Would you consider putting this summary in the README? Took looking at the comments to understand the “why?”
(comment deleted)
Just added to the readme; thanks for the suggestion :)
There was a time where I ran a sports blog and embedding tweets from journos covering the sports in question was common. The iframe widget was always terrible. Wish I had this back then. Nice work!