MPDon't you have a mistake in the 7th snippet? '#my-element' is just a string. We should pass there document.querySelector('#my-element') or ref, or query for an element inside the onClickOutside function, right?CommentยทArticleยทSep 29, 2022ยท19 Practical ES6 Snippets to Solve Common JS Problems ๐๐ฏ