Answer the question
In order to leave comments, you need to log in
React change image based on input value?
Help! I have some pictures that should change depending on the number entered in the input. With the useState hook, I get this value, but I don’t understand how to change imported pictures when comparing?
Answer the question
In order to leave comments, you need to log in
What vibrant colors...
const [rankLogo, setRankLogo] = useState(mmrLogo);
...
const checkMMR = () => {
if(input >= 800) {
setRankLogo(mmrLogo2);
}
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question