Reputation: 719
How to search const that are not being used in my project from a styled-componet file?
export const Page(not usage) = styled(Container)`
flex: 1;
flex-direction: column;
justify-content: space-between;
padding-left: 16;
padding-right: 16;
background: ${colors.theme};
`;
Can be in visual studio code or intellij _______________________________________________________
UPDATED
My style.js
// Not being exported vscode will detect
const Component = styled.View`
flex: 1;
flex-direction: column;
`;
export default {
Component,
}
My page.js
import Style from './Style';
<Style.Component> </Style.Component>
Upvotes: 0
Views: 42
Reputation: 93828
IDEA reports const as unused unless it's imported in the other module:
Upvotes: 1
Reputation: 13926
This is just my suggestion. If you manage your style file separately and you call it up and use it,
Recall the style as a whole This softens the style not used in Visual Studio Code.
Upvotes: 1