Decoupling React by environment variables
2019-12-07
Environment variables is of the best ways to differentiate/decouple between react and it’s server side dependency. In order to do so let’s take webpack as an example and download dotenv for webpack with npm or yarn: yarn add –dev dotenv webpack-dotenv or npm install dotenv webpack-dotenvĀ –save Add the following codeContinue Reading