Is it possible to change the icon when I click on it using react spring? For example, if I click on "ðĪŠ", can it be changed to "ð"? I've checked the react spring documentation and found that it can be done using the transition props. However, I'm unsure how to toggle this functionality with onClick.
The code snippet provided by react spring is as follows:
<Transition
items={toggle}
from={{ position: 'absolute', opacity: 0 }}
enter={{ opacity: 1 }}
leave={{ opacity: 0 }}>
{toggle =>
toggle
? props => <div style={props}>ð</div>
: props => <div style={props}>ðĪŠ</div>
}
</Transition>