Responding to this Twitter convo —
Let's say I'm building a blog post template page using from kind of front-end framework — for the sake of argument, we'll use Svelte. On this page, we'll have a share button that lets people share the blog post via Twitter.
Twitter makes this straightforward using their tweet web intent — just create an <a>
tag with the appropriate href
, and Twitter will take it from there. This is great — no need to faff around with an API.
But constructing the URL gets a bit unwieldy, so we'd like to turn it into a component:
<TwitterShare