I found many related questions regarding inline style of ReactJS but non suitable to mine.
I need to change the animation speed(1,3,4,6,7 are my animation speeds) in UI as per the API values (which changes dynamically)
I tried the following way
<img className="fan1" src={fan1} style={{animation: "spin "`${2}`"s linear infinite" }}></img>
<img className="fan1" src={fan1} style={{animation: "spin ${2}s linear infinite" }}></img>
<img className="fan1" src={fan1} style={{animation: `spin {2}s linear infinite` }}></img>
<img className="fan1" src={fan1} style={{animation: {spin {2}s linear infinite} }}></img>
I'm not sure how to acheive this. Please help me out.