I am using semantic-ui-react to style and show some components, and I got stuck into the following issue. Usually, I use backticks, and the dollar signs to use the core values of my variables in a link or HTTP address, but when I try to use it on the Item component, it doesn't work. It only accepts simple or double quotes. Any ideas how I can do this? I need to dynamically change the src of the Image every time the user presses a new button.
<Item.Image src=`http://...../${this.state.card}`/>
yes this won't work in react. the correct way to do it is:
<Item.Image src={`http://...../${this.state.card}`} />
This is because `(backticks) only work inside Javascript :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With