I have an app built with NextJS and I have a component composed from the Rebass Library which works, but it gives this warning in the console:
Here is the component:
// Container.js
import { Box } from "rebass"
export const Container = (props) => (
<Box
sx={{
maxWidth: "1240px",
mx: "auto",
px: 3,
}}
>
{props.children}
</Box>
)
And the index component:
import { Container } from "./Container"
const Index = (props) => (
<Container>
<div>Hello, World</div>
</Container>
)
export default Index
How can I get rid of this error message?
So it had nothing to do with the above components but rather another component in another file.
This is the prescribed way to get a themed value into a Rebass component. It didn't work for me so that is why I tried a function.