Moving from JS to React

I am having some problem using React. I built a JS calculator and when I tried to do the same in React, I was confused a lot. I know how React works like {useState} and {useEffect}, but can’t understand why I’m using it. When I try building the same projects in React as I did in JS, I am a confused a lot. Is there a cheatsheet to learning React?