1

I'm fairly new to React Native, so apologies if this is a basic question. I'm trying to apply a Dark Theme using React Native Paper, but it won't work for some reason. My code is as follows:

import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { DarkTheme, Provider as PaperProvider } from 'react-native-paper';

import { Main } from './src/main';

const theme = {
  ...DarkTheme,
};

export default function App() {
  return (
    <SafeAreaProvider>
      <PaperProvider theme={theme}>
        <Main />
      </PaperProvider>
    </SafeAreaProvider>
  );
}

It seems like this should be relatively simple. Am I missing something? Any help would be greatly appreciated.

Bry
  • 123
  • 6

1 Answers1

0

I added the below to the theme and it now works.

colors: {
    ...DarkTheme.colors
}
Bry
  • 123
  • 6