What is an environment file?
environment file or just env is a file that holds variables and some sensitive data about your app
Why do we need env files in our app?
1- according to to create react app documentation
WARNING: Do not store any secrets (such as private API keys) in your React app!
avoid storing any sensitive data in your js files, instead, use env files to store them.
sensitive data mean any data you shouldn't share with anyone such as API keys, secret ids, firebase config keys, etc...
2- To declare different variables for each environment
variables such as API URLs,
env files allow defining the values depending on the environment
/* External Links */
//_book
books you should read: https://amzn.to/3gyGNqn
//_electronics
Coder's mouse: https://amzn.to/3EWdnfu
Coder's Keyboard: https://amzn.to/3V1nRjf
Laptop: https://amzn.to/3GFdEEA
Headphones: https://amzn.to/3XqDulT
By: Jeevan Kumar | g1mishra