DEV Community

Discussion on: The "Best" Raw JS Approach to the DOM

Collapse
 
jai_type profile image
Jai Sandhu

This is very clever! I usually find if I've ended up in this situation there's something wrong with my approach, I would rethink and adopt a library for sure, just so a future person seeing the code wouldn't have a tough time understanding. I love that you figured out the second approach, makes the first one feel so hacky

Collapse
 
jdboris profile image
Joe Boris • Edited

Thanks! Yeah I think libraries/frameworks are usually the best approach too. I love React but it's difficult to use it on my phone, which I like to do on the train. Do you have any popular DOM libraries that don't require a bundler to recommend?

EDIT: Like jQuery for example, but I stopped using it since it's going out of style