You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Really nice work creating the custom video player in your React App! That being said the set state function setCurrentTime is running many times which could be more performant if you use a ref instead. Set state functions cause a re-render of components using the state data which can be an expensive task, for example if you made a game where a function runs 60 times per second using set state would not be ideal. If you attach a ref to the progress bar, or video element, you could use the ref to update the progress bar without causing a re-render, leading to better performance. Not necessarily an issue for a smaller project although generally reducing the number of times a component renders is something you can aim to achieve with React.
The text was updated successfully, but these errors were encountered:
Feedback from educators:
The text was updated successfully, but these errors were encountered: