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.

Make app composable

See original GitHub issue

Here are the changes I think need to be made to app and h to make sure that apps can be composed over each other. These features will also allow hyperapps to play nicely with independent, non-hyperapp components.

1

app#render() should not try to createElement when node is an element:

const isElement = (node) => node instanceof window.HTMLElement

2

h() should skip elements. If isElement, return “tag

3

app() should return root.

4

render should check for root existence in DOM before trying to render (making un-mounted apps less of a burden). When an app.root is added to the DOM by a parent app, a hook should fire onAppend. When removed from the DOM, a hook should fire, onRemove. root should be upgraded to a node but should not be mounted to the DOM automatically.

Let’s discuss 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
AutoSpongecommented, Mar 9, 2017

I can probably create the PR this weekend if you’re interested.

2reactions
AutoSpongecommented, Jun 14, 2017

@jbucaran I think it’s exactly what I intended. You may want to adopt the tests I used: https://github.com/hyperapp/hyperapp/pull/151/files to verify.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jetpack Compose Tutorial - Android Developers
Jetpack Compose is built around composable functions. These functions let you define your app's UI programmatically by describing how it should look and ......
Read more >
Build adaptive apps with Jetpack Compose - Google Codelabs
In this codelab you learn how to build adaptive apps for phones, tablets, and foldables, and how they enhance reachability with Jetpack Compose....
Read more >
Setup first Jetpack Compose App from scratch - Medium
1. Install Android Studio 4.2 (or later) · 2. Create an Empty Activity Project · 3. Setup the dependencies in build.gradle · 4....
Read more >
What Do We Mean When We Say: Composable Applications
A composable application repurposes individual functional pieces of an application or process that can be separated from the entire application ...
Read more >
A Practical Introduction to Jetpack Compose Android Apps
The code example above is fairly straightforward. You use layout composables the same way that you described what you wanted to build. And ......
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