Cool stuff but some of the practices shown are not the best ones. Example you are using '@import' inside a CSS file. Which is not that good for performance. In simple HTML, CSS and JS site, its better if you have multiple CSS being request using the traditional link href method, especially if your host is http2 ready.
Also, HTML being handled in JS. That also is not the best separation of concerns. I know, in frameworks/libraries like React for example you write HTML (in React's case. JSX) inside JS but those apps are built like that, that the state builds the UI and you need to tie up really close the UI and components with the state for the app to work as expected.
On this scenario we dont have this kind of requirement.
Not saying it does not work. It works and it works well. Is it a good thing to mix technologies though like this? Probably not.
Just some personal opinions. Hope on the next articles in the series you will improve these suggestions.
Hello, I am kunaal a fullstack developer.I have a youtube channel "Modern Web" where I teach to make awesome web UI/ UX. Don't forget to checkout my youtube channel
Regarding the separation between js and html, I'm wondering how you would handle dynamical loading of products from, e.g., a CMS, and creating respective product cards without using some combination of js and html... Do you have any idea regarding this? In react it is straightforward, due to the mixing of html and js world.
Thanks in advance for any tip :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Cool stuff but some of the practices shown are not the best ones. Example you are using '@import' inside a CSS file. Which is not that good for performance. In simple HTML, CSS and JS site, its better if you have multiple CSS being request using the traditional link href method, especially if your host is http2 ready.
Also, HTML being handled in JS. That also is not the best separation of concerns. I know, in frameworks/libraries like React for example you write HTML (in React's case. JSX) inside JS but those apps are built like that, that the state builds the UI and you need to tie up really close the UI and components with the state for the app to work as expected.
On this scenario we dont have this kind of requirement.
Not saying it does not work. It works and it works well. Is it a good thing to mix technologies though like this? Probably not.
Just some personal opinions. Hope on the next articles in the series you will improve these suggestions.
Thanks for your comment. I'll surely follow your advice for better performance ☺️
Regarding the separation between js and html, I'm wondering how you would handle dynamical loading of products from, e.g., a CMS, and creating respective product cards without using some combination of js and html... Do you have any idea regarding this? In react it is straightforward, due to the mixing of html and js world.
Thanks in advance for any tip :)