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.

Idea: Dismantle, repurpose, transfer, reuse?

See original GitHub issue

Instead of reusing Ultradom in Hyperapp (which is totally possible, but a bit awkward in my opinion) what if Hyperapp exported its patch function instead?

import { h, patch } from "hyperapp"

// Use h & patch as you normally would in Ultradom.

Thanks to tree-shaking, dependents of Ultradom will not need to include Hyperapp’s state management portion. 🎉

My intention is to reuse code and remove the burden of maintaining both Hyperapp and Ultradom when their respective virtual DOM implementations are virtually (pun intended) the same.


So, what would happen to Ultradom? Good question. I don’t know. Perhaps I could use it for experiments, a more sophisticated virtual DOM implementation, a new framework, library, etc.

What do you think?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
rbiggscommented, Mar 30, 2018

Enabling the export of patch from Hyperapp would eliminate the reason for Ultradom. One less library to maintain. 😃

1reaction
frenzzycommented, Mar 30, 2018

State management is already available via app function. Proof of concept: https://github.com/Swizz/hyperapp-term-poc So, I also think it is not necessary to expose something more. Just h, app and patch is enough.

Read more comments on GitHub >

github_iconTop Results From Across the Web

90+ Recycled Projects That'll Actually Transform Your Home
These 90+ recycled crafts make the perfect home decor! Save yourself a TON of money by recycling goods around the house into amazing...
Read more >
78 Hacks for Repurposing Random Old Household Items
Old milk jugs and pool noodles are standard materials for repurposing but check out some creatively repurposed items like books and gutters.
Read more >
5 Ways To Reuse And Repurpose Your Old Electronics
Dealing With Old Electronics – 5 Repurposing and Reusing Ideas · 1. Sell electronics or trade them in for credit · 2. Donating...
Read more >
120 Genius Repurposing Ideas Teach Us How To Turn Junk ...
A lot of things can be repurposed, including furniture, decorations and large things like pallets or even shipping containers.
Read more >
How To Repurpose & Reuse What You Already Have When ...
8 PRACTICAL WAYS TO DECORATE ON A BUDGET BY REUSING & REPURPOSING · 1. Decide what you need and what your style is....
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