852 karma · joined December 3, 2014
<script type="module" src="https://cdn.jsdelivr.net/npm/@bufferhead/nightowl@0.0.12/dist/nightowl.js"></script>It only index the pages that I've viewed so it's not spammed by SEO junks
So this style of code is fine in react
- phoenix liveview / ts-liveview / hotwire
- htmx
- clojure
- cycle.js
- dom-proxy
- data-template
Imagine simplifying the last example without useState and setState, nor useEffet and depList
I made a self hosted spider that only index sites that I've visited and search engine with "and" "or" logics.
Thinking to make it a federated search engine by allow each user whitelist domains that are not sensitive to search with the peer. And users can follow/block other users explicitly to avoid spam.
Your custom jsx function can return data in reusable format, that is passed to different functions for difference use case.
ts-liveview is using this approach to use jsx for both server-side rendering and compact over-the-wire updates
I think Typescript would be "easier" for a larger group of developers to hook on
Your way to support inline logic in the text and style is interesting.
https://github.com/beenotung/html-template-lite
On one hand, a library [1] can be very concise (update dom from object, with looping and nesting supported).
On another hand, a library [2] can be very flexible and reactive (update dom from dom events).
However, when double-binding (a.k.a. bi-directional binding) is required (update dom from object and update object from dom), it seems more complex than I would consider it lightweight.
When double-binding is preferred, I'd rather go for angular / vue. Still exploring alternatives.
The concept is to use Proxy API to wrap the DOM object, and auto keep track of the dependency of some reactive statements.
The DOM event listener is auto setup to trigger re-run when the UI is updated by user, and the proxy setter triggers re-run when other part of code is updating the reactive statement's dependency.
The current implementation is a lightweight library with inferred Typescript types.
This design could be extended to support server side rendering as well.