Version: Next
@RelayEnvironment
The @RelayEnvironment
property wrapper provides direct access to the current Relay.swift Environment.
Most of the time, you won't need to use this: the other property wrappers access the the current environment in the same way internally.
You may need this in order to pass on the correct environment to a view that won't inherit it normally. A common way this can happen is when presenting a sheet:
Using this property wrapper requires that another view higher in the tree has used relayEnvironment() to set the current environment for the tree. Otherwise, your app will crash.