Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Ternary operator in react for Responsive

const matches = useMediaQuery('(max-width:600px)');
return (
<>
 <Box className='innerSection'>
    
{matches ? 
 // Some Code 
 :
 // Some Code 
 </Box>
}
</>
Ternary operator in react for Responsive Using MUI
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Ternary #operator #react #Responsive
ADD COMMENT
Topic
Name
1+3 =