Since expo SDK 49 we can bring env vars in a uniform manner using the default eas.json, we can also override these variables with variables from the .env.example (eg when working against a local ngrok backend) by prefixing the env variable with EXPO_PUBLIC_
Variables can be updated as you edit your code without restarting the Expo CLI
‼️ important if someone wants to edit this code:
Alternative versions of the expression are not supported. For example, process.env['EXPO_PUBLIC_KEY'] or const {EXPO_PUBLIC_X} = process.env is invalid and will not be inlined.
Checklist
[ ] Todo 1
[ ] Todo 2
[ ] Todo 3
How to test
Add user steps to achieve desired functionality for this feature.
What this does
Since expo SDK 49 we can bring env vars in a uniform manner using the default eas.json, we can also override these variables with variables from the .env.example (eg when working against a local ngrok backend) by prefixing the env variable with
EXPO_PUBLIC_
Edit (damian) Source: Reading environment variables from .env files
This is convenient :
‼️ important if someone wants to edit this code:
Checklist
How to test
Add user steps to achieve desired functionality for this feature.