yhtml

Tiny html tag function for rendering Web Component templates with event binding (by dchester)

Yhtml Alternatives

Similar projects and alternatives to yhtml

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better yhtml alternative or higher similarity.

yhtml reviews and mentions

Posts with mentions or reviews of yhtml. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-02.
  • If Web Components are so great, why am I not using them?
    12 projects | news.ycombinator.com | 2 Aug 2023
    The main reason is that they're too low-level to use directly.

    They do a lot, but stop just short of being useful without something of a framework on top. I tried hard to use them directly, but found that it was untenable without sensible template interpolation, and without helpers for event binding.

    Here's my shot at the smallest possible "framework" atop Web Components that make them workable (and even enjoyable) as an application developer:

    https://github.com/dchester/yhtml

    It's just ~10 SLOC, admittedly dense, but which make a world of difference in terms of usability. With that in place, now you can write markup in a style not too dissimilar from React or Vue, like...

        ${this.count}
  • Modern SPAs without bundlers, CDNs, or Node.js
    8 projects | news.ycombinator.com | 16 Feb 2023
    I also sometimes enjoy this approach of starting from absolutely nothing.

    Instead of taking the path of starting with DOM manipulation and then going to a framework as necessary, I've kept really trying to make raw web components work, but kept finding that I wanted just a little bit more.

    I managed to get the more I wanted -- sensible template interpolation with event binding -- boiled down to a tag function in 481 bytes / 12 lines of (dense) source code, which I feel like is small enough that you can copy/paste it around and not feel to bad about it. It's here if anyone cares to look: https://github.com/dchester/yhtml

  • Bytes HTML tag function for rendering Web Component templates
    1 project | news.ycombinator.com | 18 Sep 2022
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 1 May 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Stats

Basic yhtml repo stats
3
101
3.1
9 months ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com