Thursday, September 23, 2021

React Snap

Tried out React Snap within this blog a couple of days ago. The reason why I was interested in using it was to have proper social share support. For instance when you share a url on Slack you sometimes get a nice preview of the page with the title and description.

Actually installing React Snap is a breeze with just a few additions to your package.json. However, the slowness of builds and weird rendering behaviour once deployed was the reason I've switched back to not using it.

My build time went from about ~20 secs to ~1 min and this simply wasn't something I wanted to sacrifice. I enjoy having speedy builds if I need to quickly edit a post.

The weird rendering behaviour was related to flashes that I'd occasionally notice when pages loaded. The content would render, disappear and then appear again hence the flashing comparison. I'm sure there is a fix to this but I couldn't find anything documented.

At the end of the day I don't really need social sharing as my posts aren't really shared in this way. What I do need is a clean RSS feed and fast builds.