.env not working on react

JavaScript
//install dotenv via npm
//npm install dotenv --save

//At the top of your file add
require('dotenv').config();
Source

Also in JavaScript: