News for hackers. Stuff that matters.
Re:You might not need jQuery (2014) by hu3 on Thursday January 14, 2021 @10:05AM (#25777118)
I'd like to learn about usage of preact with hyperlink or similar. Do you know of a repo I can take a look?
Re:You might not need jQuery (2014) by hajile on Thursday January 14, 2021 @10:55AM (#25777847)
I think that's hard to ascertain because it's a drop-in replacement for react. I assume you mean hyperapp instead of hyperlink.

It gets around a half-million downloads per week according to NPM stats while hyperapp gets under 3k per week.

Re:You might not need jQuery (2014) by hu3 on Thursday January 14, 2021 @11:32AM (#25778349)
Yes. Or hyperscript as my parent posted. I'd love to see an example of preact with it.

But looking at the repo https://github.com/hyperhype/hyperscript I have a hard time imagining how preact can work together. They seem to overlap in functionality.

Re:You might not need jQuery (2014) by hajile on Thursday January 14, 2021 @12:04PM (#25778894)
You can either use their native `h` (basically createElement in React)

https://preactjs.com/guide/v10/tutorial/

or you can use the full hyperscript markup library

https://github.com/queckezz/preact-hyperscript