To illustrate the use-case, I have a </video>
tag that dispatches an action every time (~250ms
) the playhead moves. I'm not a Flux/Redux's guru and I'm facing some issues:
Many many thanks for you help !
I think the approach is reasonable (especially if you are wanting to use information from that video element across the application), and depending on the app/actions, there may be consequences.
If you are using React with Redux, the connect
higher-order component can take a pure: true
option to do a shallow compare of props in the shouldComponentUpdate
callback that might help prevent too many re-renders.
Otherwise you could use a store enhancer or higher-order reducer to specially handle the actions fired by the video element. The redux-ignore middleware may help with that or provide a pattern for doing so.