# useEnvironmentVariable

Retrieve a specific environment variable registered with the EnvironmentVariablesPlugin instance.

# Reference

const variable = useEnvironmentVariable("apiBaseUrl")

# Parameters

  • key: The environment variable key.

# Returns

The environment variable value if there's a match, otherwise an Error is thrown.

# Usage

import { useEnvironmentVariable } from "@squide/env-vars";

const apiBaseUrl = useEnvironmentVariable("apiBaseUrl");