If you want to run this app:
- Clone this repo to your computer.
cd day2-components-example
and run this commandnpm run dev
##Environmental variables setup
- Create a file named
.env
in the same level as.gitignore
- Make sure
.env
file name is in.gitignore
- In a React application's
.env
file, you can declare an environment variable by puttingREACT_APP_(VARIABLE_NAME_HERE)
and assign it to, for example, your API key(to hide it). - To use the variable elsewhere in a
.js
file, useprocess.env.REACT_APP_(VARIABLE_NAME_HERE)
.