How does react save the state life cycle to update pictures quickly?

to make a video h5, the need is for video to picture playback, that is, to cut the video into hundreds of frames and then quickly switch pictures. If you don"t have a frame, you won"t get stuttered. However, due to the various tedious life cycles of using react, it is used to keep the status of src switching all the time, and the performance of the phone is insufficient, so it is very stuttered.
is there any way to bypass the react life cycle and switch src? directly at the speed of 82ms
the PC side is normal.

Nov.29,2021

just use props directly in render .


operate dom directly with ref


it is recommended to use the functional components of react. does not declare the period .


in the end, the state is used to do it. The practice is as follows:

first write a function to generate 400 img tags at a time, and then judge the img tag and the src serial number index. If the sequence src serial number of the generated picture is equal, it will be displayed, but not equal display none.

.
Menu