React Native Root View Background
Original: https://github.com/johniak/react-native-root-view-background
Remake to support React Native latest version.
Set background color of root view to fix white flash when using dark theme and navigating with React Navigation. Read more in example
.
After
Before
Getting started
npm i @pnthach95/react-native-root-view-background --save
or
yarn add @pnthach95/react-native-root-view-background
Usage
import { setRootViewBackgroundColor } from '@pnthach95/react-native-root-view-background';
const Main = () => {
useEffect(() => {
setRootViewBackgroundColor('#ccc');
}, []);
}
License
MIT