Kevin Powell - CommunityKP-C
Kevin Powell - Community4y ago
10 replies
CDL

Trying to convert a project with the state in html, to a project with the state in js, no framework

TYes, it's tedious, and annoying, and I'm sure I know how to do it, I just don't... know... how to do it...?

So the HTML version is this: https://codepen.io/Laing91/pen/rNKNaQb

What I want to do is re-create this with the state in JS, effecitvely the only HTML I will have written is a div with id="main" in it. similar to root in React, I guess. I am having an almightily difficult time doing this, however. The best I can do so far is https://jsfiddle.net/yehwb25m/1/ and even that doesn't feel anywhere close to what I'm trying to do.

My biggest issue is I am not sure how to cycle through my objects and push the data into the html.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Was this page helpful?