Expo UI and Router for iOSExpo SDK 57 and later, iOS only
Modifiers

environment

Sets a SwiftUI environment value.

environment(config)

Overload #1

ParameterType
configEnvironmentConfig

Sets a SwiftUI environment value.

Returns: ModifierConfig

See: Official SwiftUI documentation.

environment(key, value)

Overload #2

ParameterType
key'colorScheme' | 'editMode' | 'locale' | 'timeZone'
valuestring

Sets a SwiftUI environment value.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

You can add environment to any view. It changes what you see on 39 of the 39 components.

Sources

The original Expo docs for this page:

On this page