Using Doppler with React Native

New user here!

Enjoying using doppler both locally / vercel / github actions and all others!

My team is trying to use doppler for react native locally, but seems like it’s not picking up any of the environment variables even after doppler setup.

I am currently running it with this command “doppler run – react-native start”, and any lead will be very helpful, thanks!

It seems the recommended approach is to use a .env file that can be consumed by a library such as react-native-dotenv

A typical workflow would be:

  1. Add a pre-build step that calls ‘doppler secrets download —no-file —format env > .env’ to save the secrets to a .env file.

  2. Perform the build with react-native-dotenv parsing the secrets from the .env file.

  3. Add a post-build step to remove the .env file.