What's this all about?
To get my hands back on vanilla js I've set myself a challenge 💪
- Read a JSON file & reduce it
- Render items and manipulate the DOM with an API that abstracts this 🤓
- Routing time!
/item?xxx
createNode
is in charge of creating all dom nodes easly.
Just send the type of node you want (div
, span
, p
, h1
, ...), some custom atts, and children if needed.
createNode('footer', { class: "footer" },
createNode('a', { href: 'http://www.github.com/elstr' }, "Made with 💚 by Eleonora Lester"),
)
Checkout what's up with window.location.search
and render the Item
component by sending some props to it.
Yup, like the react way but in a more vanilla way ✨
npm i
npm run start
localhost:5000