https://mainasara.dev/posts/how-to-avoid-javascript-bugs-31pm/