Reputation: 10759
I am trying to use this line of code but looks like its using typescript. My project is not. I need to make it work in ReactJS (newbie to JS and ReactJS). Just need to understand what this below means and how to make it reactjs compliant.
const VideoPreview = ({ stream }: { stream: MediaStream | null }) => {
Changing to this fixes it, but do NOT know what | null
means?
const VideoPreview = ({ stream }) => {
Upvotes: 0
Views: 162