Georgia and I mentioned avoiding using inner.HTML to set text content. In the grand scheme of things it's not too bad in this context as you're never allowing the user to access this part of the code and it's only used to clear things before you re-render. However, I'd get in the habit of not using it as textContent does the same thing and doesn't have related issues.
Georgia and I mentioned avoiding using
inner.HTML
to set text content. In the grand scheme of things it's not too bad in this context as you're never allowing the user to access this part of the code and it's only used to clear things before you re-render. However, I'd get in the habit of not using it astextContent
does the same thing and doesn't have related issues.Read the top response - https://www.reddit.com/r/learnjavascript/comments/9502x5/is_innerhtml_still_considered_bad/