Skip to content

setEnvironment

setEnvironment(env?): ResolvedEnvironment

Defined in: config/environment.ts:113

Publish the environment for every later reader. Called by the client entrypoints (createIframe / createIFrameFrakClient / the React provider), so it runs more than once per page in normal use.

An omitted env is a no-op rather than “reset to production”: a second client built from a bare config would otherwise silently repoint the first one’s in-flight calls. The production default lives in getEnvironment instead.

FrakEnvironment

ResolvedEnvironment