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 nostr:npub1r0rs5q2gk0e3dk3nlc7gnu378ec6cnlenqp8a3cjhyzu6f8k5sgs4sq9ac gave it to me.


Who is this for? Website builders? Web app devs?


nostr:npub168ghgug469n4r2tuyw05dmqhqv5jcwm7nxytn67afmz8qkc4a4zqsu2dlc client 💡


Onward 🫡


Using web components makes sense for many Nostr things


Storybook is a nice addition to showcase and document 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


Fuckin’ A


make view source great again


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/


And this is a new learning resource of a Dutch dev which I follow (he is a PWA expert) https://dannymoerkerke.gumroad.com/l/mastering-web-components?ref=modern-web-weekly.ghost.io


Here's a very colorful demo page of the components available so far: https://unpkg.com/nostr-web-components@0.0.3/demo.html
No build steps required.


> No build step required

Hacker news submission candidate


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.


Webmasters.


I love this


How is that different from an HTML page that showcases them?


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 🧐🤓


oop i think i found it nostr:nevent1qqsx0x94s8dldng2retrt6mzztsr8cqfm2l0a2q4nwane6mpwjfp4fqpzdmhxue69uhk7enxvd5xz6tw9ec82c30qgsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8grqsqqqqqpqfa3jr


べつでとってる6がさいふるはんていされないように

さいごのくりえいとあっとじゃなくてさいごのkind1のくりえいとあっとにする

画像読みの時はストレージのデータ読み込まずにリレーに取りに行ってみるけどそこで取れたデータが持ってるやつより古いときはストレージの方のデータを渡すとか