Re:Web-dev nirvana, and why I needed to let go of React to r...
by bryanbraun on Tuesday September 24, 2019 @03:43PM
(#21063807)
Original author here.
I don't think nesting is possible in the examples in that post. I'm sure there's some way to get it working that I just haven't figured out yet. Maybe you could replace the default template strings with something using tagged template literals (like https://github.com/developit/htm).
You can work around nesting by spinning up new components after the innerHTML assignment, and assigning them with IDs. Here's an example where I've done that:
I don't think nesting is possible in the examples in that post. I'm sure there's some way to get it working that I just haven't figured out yet. Maybe you could replace the default template strings with something using tagged template literals (like https://github.com/developit/htm).
You can work around nesting by spinning up new components after the innerHTML assignment, and assigning them with IDs. Here's an example where I've done that:
https://github.com/bryanbraun/music-box-fun/blob/dc899c14adc...
Edit: typos