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

React Native TypeScript Error: Module '"react-native"' has no exported member 'Appearance'

$
0
0

I've recently implemented dark mode into my app, but having an issue with an error when building the npm package with npm build. The code works, but is there a way or a reason to remove this error?

React Native Docs: Appearance

Error

src/ContactActionSheet.tsx:3:10 - error TS2305: Module '"react-native"' has no exported member 'Appearance'.3 import { Appearance, Dimensions, StyleSheet, Text, View, Linking, TouchableOpacity } from 'react-native';

JSX

// Imports: Dependenciesimport { Appearance, Dimensions, StyleSheet, Text, View, Linking, TouchableOpacity } from 'react-native';// Dark Modeconst colorScheme = Appearance.getColorScheme();

Viewing all articles
Browse latest Browse all 6214

Trending Articles



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