DEV Community

Discussion on: 10 JavaScript Projects in 1 Hour - Coding Challenge

Collapse
 
perpetual_education profile image
perpetual . education • Edited

This was super fun to watch!

We subscribed!

Here are the thoughts we had while watching:

  • You can also toggle a class to the body like .menu-open and then style the menu, button, and anything else based on that one point
  • You can probably do all of those challenges in the same project! :)
  • Using event delegation, you can get away from adding events specifically to buttons - and then maybe just add a rel='menu-toggle' to many places to trigger events.
  • You can also use a checkbox hack to toggle things and skip the events
  • One cool thing is that you can use pointer-events: none and opacity: 0 on some things - and it's like the modal is always there... but it's not in the way!
  • Close and open are often the same function
  • Could pass in an Object to the modal and use it in a template
  • Purple heart rain is really fun
  • Would be cool to try using @media (prefers-color-scheme: dark) {...
  • We find ourselves just reaching for template strings instead of document.create for fast things. Curious how you decide on that
  • Cool zoom implementation! Would be nice to toggle it
Collapse
 
florinpop17 profile image
Florin Pop

I really appreciate your feedback and I'm happy you liked it! ๐Ÿ’œ

I probably knew 90% of what you mentioned above and you are right, I should have used those but being under the time pressure... ๐Ÿ˜…

Collapse
 
dejanantic profile image
Dejan Antic

Would love to se the video remade with these suggestions :)

Collapse
 
perpetual_education profile image
perpetual . education

Maybe we could pull together something similar. What are 10 things that you would actually want to do in a real project? (we do love purple rain hearts)... but if you have a short list, let us know.