Make app composable
See original GitHub issueHere 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:
- Created 7 years ago
- Comments:16 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can probably create the PR this weekend if you’re interested.
@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.