Simple question. Why this one works:
const heroText = {
height: 400,
display: "flex",
justifyContent: "center",
}
<Grid item sx={heroText}>Some text</Grid>
And this one will give you the Typescript error ("No overload matches this call."):
const heroText = {
height: 400,
display: "flex",
justifyContent: "center",
flexDirection: "column",
}
<Grid item sx={heroText}>Some text</Grid>
If you do not believe me that just adding the flexDirection: "column" will produce Typescript error, you can try it for yourself.
I am working with new MUI 5, React and Typescript.