Integrating the GraphQL API with the React Native and Expo apps
For the Expo and React Native projects, we cannot use standard CSS; we must use the React way of styling. If you want to let the user switch between light and dark modes on your app, you must keep the styling for the external files so that you can use code to switch between the different themes. In this case, we will create the AppStyles.ts
file in the root directory with the following code:
import { StyleSheet } from 'react-native'; export default StyleSheet.create({ container: { flex: 1, justifyContent: 'center', padding: 20 }, todo: { marginBottom: 15 }, input: { height: 50, backgroundColor: '#ddd', marginBottom: 10, padding: 8 }, todoName: { fontSize: 18 } });