GitHub user search app [TailwindCSS, Vanila JS, AnimeJS library]
Design comparison
Community feedback
- @jacksonwhitingPosted about 1 year ago
Nice work on this. I learned quite a bit by looking at your code. I like how you used restructuring to pull out variables from the API data.
How do you like writing HTML in Javascript files using inner.html. Using querySelector and updating textContent on each node is getting old for me. I'm looking at possibly implementing a lightweight templating language while I keep working with vanilla javascript (and no framework) just to make things a bit quicker and easier updating DOM nodes.
Thoguhts?
1@beqarionPosted about 1 year ago@jacksonwhiting
Thanks a lot <3 I'm glad you have taken something valuable from this one.
Targeting nodes separately and updating their content separately - that feels old to me too. But while focusing on vanilla JS, I think this older approach is okay. Maybe its like learning history :))
On this one, I used a little bit different approach. First, I used dummy HTML in the index.html file, styled it, and then cut it and pasted it into the JS code to populate it with data, and pushed it as a whole back into index.html, in the container node.
Actually, I don't like it too much. In small projects, I think it's acceptable. Although Tailwind CSS works fine on strings like that, I don't think it's the future of my coding. I'm going to switch to React, I think. It's somehow similar to my approach here. Templating language? I don't know. I think maybe I could use one if I started to work with Node + Express though."
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord