Creating env variables in React
To create env variables in a React app, create a .env file in the root of the repo.
To expose an environment variable, the environment variable should start with REACT_APP_
- The minimal-ui template that GQC uses was created with CRA (create-react-app)
- Hence, all variables used in the
.envvariables should start withREACT_APP_.
info
You can read more about it over → here