MCPcopy
hub / github.com/tjallingt/react-youtube / shouldUpdatePlayer

Function shouldUpdatePlayer

packages/react-youtube/src/YouTube.tsx:59–68  ·  view source on GitHub ↗

* Check whether a props change should result in an update of player.

(prevProps: YouTubeProps, props: YouTubeProps)

Source from the content-addressed store, hash-verified

57 * Check whether a props change should result in an update of player.
58 */
59function shouldUpdatePlayer(prevProps: YouTubeProps, props: YouTubeProps) {
60 return (
61 prevProps.id !== props.id ||
62 prevProps.className !== props.className ||
63 prevProps.opts?.width !== props.opts?.width ||
64 prevProps.opts?.height !== props.opts?.height ||
65 prevProps.iframeClassName !== props.iframeClassName ||
66 prevProps.title !== props.title
67 );
68}
69
70type YoutubePlayerCueVideoOptions = {
71 videoId: string;

Callers 1

componentDidUpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…