question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standalone vdom from hyperapp

See original GitHub issue

I was wondering if there is a way to just use the vdom of hyperapp, with lifecycle hooks, but without state management and router? Could vdom become a separate file that I can require const vdom = require('hyperapp/vdom') and use like this (roughly)?

It could be a separate package (which you probably don’t want to do), or it could be just a module inside hyperapp that could be used standalone. Basically, I want something as simple, friendly and low-level as yo-yo, but with vdom and useful lifecycle hooks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
leeoniyacommented, Mar 6, 2017

@jbucaran thanks for the mention 😃

domvm’s hyperscript factories are also non-standard, since they support more features than possible with JSX. you could probably create a JSX adapter if you’re willing to give up a bunch of niceties. i’m not a fan of JSX or requiring users to set up node/babel, an IDE and other tooling to use domvm. the goal is to be 100% usable with plain js and a <script> include, like good ole jQuery 😉

for posterity, i suppose: https://github.com/leeoniya/domvm

some other worthy mentions:

https://github.com/AFASSoftware/maquette https://github.com/thysultan/dio.js https://github.com/pakastin/redom https://github.com/lhorie/mithril.js

4reactions
jorgebucarancommented, Mar 6, 2017

Right, but you did that for a reason?

Yes, I wanted a no-dependency, light and fast vdom engine.

  • Virtual-dom development is slow.
  • Morphodom’s most attractive feature (diffing native DOM elements) is slow and still comes with a bunch of deps that could be spared. Why?
  • Snabbdom is the fastest on this list, but it’s too big. The API is also non-standard (it uses its own h vnode factory function which is incompatible with hyperscript). For that reason, you need a function that can translate Snabbdom’s h to a Hyperx/JSX compatible function. I even published hyperx-to-snabbdom and used it for a while.

Can you recommend something as light, with lifecycle hooks?

@leeoniya’s domvm is fast and has a rich lifecycle hook system.

Read more comments on GitHub >

github_iconTop Results From Across the Web

hyperapp - npm
Standalone — Do more with less. Hyperapp combines state management with a virtual DOM engine that supports keyed updates & lifecycle events ...
Read more >
Jorge Bucaran on Twitter: "https://t.co/aaBVgafJ2J #hyperapp ...
#hyperapp Hyperapp V2 is powered by Superfine! A standalone VDOM engine you can easily mix with your favorite state container: Redux, Mobx, etc....
Read more >
Technical Tip: HA Standalone Management Vdom
The HA Standalone Management Vdom provides a direct management access to cluster units by reserving a vdom specialized for management.
Read more >
Hyperapp vs Redux Offline | What are the differences? - StackShare
Developers describe Hyperapp as "1 KB JavaScript library for building front end applications". Out of the box, Hyperapp combines state management with a...
Read more >
Anyone working on MVU/Elm Architecture/non-React?
bucklescript-tea looks to be the closest to being portable, ... You might either be able to get by with Hyperapp's efficient vdom ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found