If you add styled-components
to your React Native project, there's a sub-directory for the native components specifically:
import styled from 'styled-components/native`;
export const Container = styled.View`
...
`;
If you try to do this in a React Native TypeScript project, you'll run into the following typings error:
Could not find a declaration file for module 'styled-components/native'.
The typical approach to resolving this would be to install the @types/styled-components
module in your dev dependencies, however this does not resolve the issue.
tsconfig.json
not solve, just reload vscode window if using. – Amadeus