Comments (3)
Hi @ArthurSonzogni,
in the latest version of asm-dom a normalization of VNodes is executed immediately after their creation. So, in this case new children are simply ignored... It will continue to work after the merge and release of PR #21, since the normalization will take place only when really needed (when patch
is called).
However, adding children after the creation of a VNode is not recommended, it should be created using CPX or the h
function and then never modified by the user.
With CPX you can set children dynamically in the way defined here, using asmdom::Children
.
I think we can leave this issue open and update the doc to highlight it. What do you think?
Let me know if it works fine after that little change 😄
from asm-dom.
Yes, I am now using it with:
asmdom::Children children
for(auto it = ..)
children.push_back(it)
return <div> {...children} </div>
Which looks better to me.
Feel free to close this bug. I just observed something regressed, but not supporting this looks good to me.
from asm-dom.
Perfect! I'll close this
from asm-dom.
Related Issues (20)
- Support for web components HOT 6
- Benchmark comparison to major SPA (react, vue, etc.) libraries? HOT 2
- Is this still an active project? HOT 2
- Could there be a browser that supports cpx? Or is this entirely out of scope?
- WebGL, WebGPU etc. for rich graphics?
- What are the preferred ways to add interactivity to SPAs with asm-dom?
- Why doesn't WASM make this project obsolete?
- Any input, if I'd wish to see an usability comparison of asm-dom to existing JS frameworks?
- C++ for production web development? HOT 9
- Featuring asm-dom in Docusaurus HOT 1
- Question: Using CLion, Compiling to Native HOT 3
- git submodule init fails. HOT 1
- Compilation fails because of undefined behaviour catched by `-Wunsequenced` HOT 7
- HTML parser from cobalt
- Shared logic for desktop/mobile and web browser
- VNode reuse HOT 24
- SVG Support is broken HOT 1
- Inline Example in README.md is missing a closing parenthesis. HOT 2
- Support SSR(Server Side Rendering)? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asm-dom.