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.

Effort for lit-html

See original GitHub issue

First of all I should say I’ve looked at the API and I think it looks awesomelly promising. I’ll play with it for a bit in some little personal projects and I think it has huge potential to soon become my lib of choice for some large projects in the future.

But I definitelly couldn’t stop thinking that hyperapp (with ~1kb) united with lit-html (with ~1.7kb) in the near future would be one of the best performant choices with the minimal API surface to absorb.

Would be possible to measure the effort to use lit-html with hyperapp?

Any directions for a starting point on how could this be done?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
selfupcommented, Jan 7, 2018

So currently if you do not pass a container (Node/Element) to HA it does not render to the DOM 🎉

You could use exposed actions to change state from lit-html!

Or just use the state and actions given to you in your view 🤔

As you can see however, just depending on exposed actions will only return the return value of said action. It won’t include the entire state.

screen shot 2018-01-06 at 9 09 17 pm

So now I guess you would load hyperapp with a blank view and have some lit-html rendering logic in the view itself? Like:

<div>
  {
    /* since here you will have access to the entire state tree */
    /* write your render calls here */
  }
</div>

Either way, feel free to experiment and let us know what you discover 😄 👍

1reaction
jorgebucarancommented, Jan 7, 2018

Hi @wescoder! I think it would be interesting to experiment removing Hyperapp’s built-in VDOM and replacing it with lit-html’s similar DOM manipulating/updating system, but without changing the surface API. If you want to play with this, I’d be happy to help. I’d recommend you hop on Slack to discuss the details.

However, I am not interested in having both libraries work together. I want to use only hyperapp or only lit-html, but not both.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction - Lit.dev
lit -html is a simple, modern, safe, small and fast HTML templating library for JavaScript. lit-html lets you write HTML templates in JavaScript...
Read more >
How to implement lit-html instead of juicy-html in a polymer 3 ...
I used juicy-html, but they have not updated to Polymer 3 and I see that there is lit-html. I am wondering how I...
Read more >
LitElement 3.0 & lit-html 2.0, what's new and exciting? - YouTube
Justin Fagnani from the Polymer team is joining us to discuss the next major releases of LitElement and lit - html. The new...
Read more >
lit-html, JavaScript templating from the Polymer team at Google
At the time of writing the project is in PolymerLabs; the effort put into it is limited, and the project is not yet...
Read more >
Getting started with LitElement and TypeScript - This Dot Labs
import { LitElement, html } from 'lit-element'; ... consultancy focused on helping companies realize their digital transformation efforts.
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