useEnvValue
The useEnvValue hook manages an internal React state that is synced to the value of a ENV value.
It returns an array matching the API for React.useState
.
The first entry in the array is the environment value and the second entry is a setter that will both update the state and the value in the environment.
The first parameter of the hook is the path
to the environment value and the second parameter is the defaultValue
.