Can't find a way to use setStatusBarStyle

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): Android/iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hi! in this snack I have created a little example to try to programmatically change status bar style

I can’t use setStatusBarStyle

If used like this


I get TypeError: _expoStatusBar.StatusBar.setStatusBarStyle is not a function.

If used like this

ref = {(ref) => (this.statusbar = ref)}


I get null is not an object (evaluating _this.StatusBar.setStatusBarStyle )

Forget it… just found a way

import { StatusBar, setStatusBarStyle } from 'expo-status-bar';

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.