I created a simple styled component with a custom property test, but when rendered, the test property just did not appear in the div dom, what happened?
const StyledDiv = styled.div<{
test?: boolean;
}>`
color:red;
`;
//in render function...
<StyledDiv test>it's just test</StyledDiv>

In React boolean value is not passed to the dom element in means that
testortest={true}will not be available to the dom. It only supports three types ofstring,numberandobjectand it will convert those tostringso all you need to do is change it tootest=""and it will work.If you are looking to access the prop
testin your component you need to do something like this: