Yesterday, I shared my latest YouTube video on how to build a modern web app with vanilla Web Components. If you missed it, the tl;dr is that users can add items to a list ( The code for picking the items looks like this…
One viewer asked a question:
It's a great question! In most modern JS apps, you'd do something like this instead…
But as Jeremy Keith wrote in his article on HTML Web Components…
Web Components are very much with the grain of the web. Storing your data in JavaScript objects is a React convention. It absolutely makes sense in certain situations, but in this app, it would just add more complexity. If my It's simpler and less buggy to let the DOM be the state of the app, and query it when needed. Cheers, Want to share this with others or read it later? View it in a browser. |
Related Post:
- Transportation Producer Price Index – February 2025
- You're unsubscribed from the VoltBuilder Mailing List
- Please confirm your VoltBuilder Mailing List subscription
- Spring into Savings: Clearance Deals Picked Just for You!
- Nokia has published its Nokia in 2024 Annual Report and filed its Annual Report on Form 20-F for 2024
0 Komentar untuk "[Go Make Things] Keeping state in the DOM vs. state in a JavaScript object"