Answer the question
In order to leave comments, you need to log in
How to fix Received `false` for a non-boolean attribute `loading` error?
Good afternoon! The page has 2 components that lead to the main page
, but because of this, an error is thrown:<Link to="/">
Answer the question
In order to leave comments, you need to log in
You are written in red and white how to fix it. Can't read? Well, go hammer this text into an online translator.
In general, learn English. A developer who is unable to understand English text is unsuitable for professional use.
In general, the solution is something like this:
You need to rewrite the data type that is included in the styledComponent itself,
for example, you need the isOutlined prop:
Place of use:
The component itself
<YourComponent isOutlined={true} />
const StyledComponent = ({ ... }) => {...
return <Wrapper ... isOutlined={isOutlined ? isOutlined.toString() : undefined}
}
const Wrapper = styled.div<{ isOutlined?: string}>`
border: ${( props) => props.isOutlined ? '2px solid red' : 'none};
`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question