To Use .env File in React Project First of all, create .env file at the root of your project. and add variables into .env file: REACT_APP_SECRET_NAME = 'secret-name-here' And then You can Use .env file variable just putting process and then env and then your variable name. Just like this: process.env.REACT_APP_SECRET_NAME Now, You can add env variables in your project. Thank you.