I was trying to use the style tag in order to make the website I'm working for, much more mobile-friendly, however, the style tag was giving me errors
const styleCheck = () => {
return (
<div>
<style>
Grid {
display: flex
}
</style>
</div>
)
}
The idea is that Grid is a different tag that I use later on, in the return value for the main function and hence I wanted to change it's location depending on whether the user is browsing in mobile mode or on a larger screen like a laptop.
However, the program is giving me error on the display:flex
line. It states that }' expected
and on the } right below the line it gives the error: Unexpected token. Did you mean {'}'}
or }
?
I could, of course, give more code if necessary, but I'm curious as to the reasoning for this error in the style tag.