tired of having to create a giant boilerplate with 42 javascript files and fight for hours against buggy build tools, unhappy linters and unresolved type-checkers, I started a collection of nostr web components that hopefully can be imported with just a script tag and used directly:
<nostr-name pubkey="npub1..." />, for example, just displays the name of the referred pubkey.
https://git.fiatjaf.com/nostr-web-components
I'm not sure this will work or if they will be very useful. let me know if you have suggestions of other components to create.
my immediate use case for this was just to display the name of the app author without having to hardcode it or create giant javascript abyss on the new version of https://nostrapps.com/ (that hopefully will look exactly the same) that I'm porting to a more mentally sane setup after @Karnage gave it to me.
Who is this for? Website builders? Web app devs?
Using web components makes sense for many Nostr things
Like what?
A note, a reply to a note, raw data view of an event, a npub-to-follow button (and the inverse of it), a zap to a note, a thread with note replies and the note, etc etc
This dev is doing a lot with web components https://gomakethings.com/articles/
This is something that would be good to follow if it was a Nostr feed and not a daily email.
Let’s build a RSS to Nostr feed bridge so everyone could load this as a custom feed into a client 🧐🤓
Storybook is a nice addition to showcase and document them !
How is that different from an HTML page that showcases them?
npm create osty@latest is what you need!
I Can teach you how to invest in stock mining turn your $200 to $5,500 in just 2hrs ask me How! text me for more info TEXT SMS: Text No:+1 (703) 879-8125
WhatsApp:+1(332)252-4701
WhatsApp link below 👇 👇👇👇
https://wa.me/message/7L7D2AETIXNUD1
make view source great again
does each component connect and query or are the relay connections persistent?
They're reused by means of a magical technique known as a global variable. Results are also cached locally in another global.