function RecoilRelayEnvironment({
  environmentKey,
  environment,
  children,
}: {
  environmentKey: EnvironmentKey,
  environment: IEnvironment,
  children: React.Node,
}): React.Node {
  const storeID = useRecoilStoreID();
  registerRelayEnvironment(storeID, environment, environmentKey);
  // Cleanup to avoid leaking retaining Relay Environments.
  useEffect(
    () => registerRelayEnvironment(storeID, environment, environmentKey),
    [storeID, environment, environmentKey],
  );

  return children;
}
@explorer-desc
Associates a RelayEnvironment with an EnvironmentKey for this <RecoilRoot>.