I have a button styled as a Font Awesome.
<button
onClick={this.changeLockButtonStyle}
id="LockButton"
>
<FaLockOpen />
</button>
I'm trying to find a way to change the style to <FaLockClosed />
From reading up online the only examples I see are regarding JQuery and class=”fas fa-lockclosed” toggle class. But I am using a button, not the normal icon. I have tried document.getElementById('LockButton').innerHTML= '<FaLockClosed />'
but doesnt work. I'd like to avoid using JQuery if possible.