ThemeProvider
from react-native-elements
in not allowing childrens.
Here is the code :
const Root = () => { const {theme, isNewUser} = Settings.useContainer(); const darkMode = useMemo(() => theme === 'dark', [theme]); return (<ThemeProvider theme={darkMode ? darkTheme : lightTheme} useDark={darkMode}> {isNewUser ? <OnboardingStack /> : <BottomTab />}</ThemeProvider> );};
ThemeProvider is having red underline, on hover it is saying
Type '{ children: Element; theme: RCTheme; useDark: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ThemeProvider> & Pick<Readonly<ThemeProviderProps>, never> & InexactPartial<...> & InexactPartial<...>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ThemeProvider> & Pick<Readonly<ThemeProviderProps>, never> & InexactPartial<...> & InexactPartial<...>'.ts(2322)