react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Warning with pass value CSS properties width and height

Open AtNovember opened this issue 9 years ago • 2 comments

Warning: a div tag (owner: ReactPlayer) was passed a numeric string value for CSS property width (value: 260) which will be treated as a unitless number in a future version of React.

<ReactPlayer
   url={video.link}
   height="180"
   width="260"
/>

AtNovember avatar Nov 02 '17 08:11 AtNovember

@AtNovember use 180px instead of 180, etc.

Redmega avatar Nov 02 '17 19:11 Redmega

You should pass in numeric values like width={260} height={180} or, as @Redmega says, add units to the strings like width="260px" height="180px"

cookpete avatar Nov 08 '17 11:11 cookpete