Set root view background color for Android and iOS
npm install @pnthach95/react-native-root-view-backgroundOriginal: 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.


npm i @pnthach95/react-native-root-view-background --save
or
yarn add @pnthach95/react-native-root-view-background
> [!NOTE]
> From v2, old arch is not supported
> [!NOTE]
> New arch supported since v1.4.8
>
> If latest version doesn't work, try v1.4.3
``js
import { setRootViewBackgroundColor } from '@pnthach95/react-native-root-view-background';
const Main = () => {
useEffect(() => {
setRootViewBackgroundColor('#ccc');
}, []);
}
``
They have SystemUI which is similar to this package
- Development workflow
- Sending a pull request
- Code of conduct
MIT
---
Made with create-react-native-library