Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Could not find a declaration file for module 'styled-components/native'

$
0
0

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.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>