As title says. I have some caption boxes which are all connected to a Zustand state and update the state for each interval. Whenever I type in one of them, they are one update behind. For example changing 'text' -> 'textt' in a caption box still displays as 'text' in the Player. Pressing Pause/Play on the player resets the player to the initial state of my captions object, and completely stops updating no matter what I type until I refresh the page.
Also, how to prevent my state from being reset on page reload?
Code Gists with my store, hooks and the Caption components:
https://gist.github.com/polooner/4adc157bbc6b9c51b442f47f1dfaba80