How To Implement Environment Variables in React Native

preview_player
Показать описание
In this tutorial, you'll learn how to implement environment variables in react native. In any project where you need to provide sensitive information such as an API key, you should use an environment variable in your project to protect that information. This is a beginner friendly tutorial, so also if you're new to react native development you can follow along with this tutorial.

Рекомендации по теме
Комментарии
Автор

i love you so much U HAVE NO IDEA HOW IMPORTANT THIS WAS

rayyanwz
Автор

After instaling the package you need to restart the project, and just use --clear to clear the cache, no need to restart the machine. Thanks for the vídeo <3

KlethonioFerreira
Автор

Abolute Legend my gut. Thanks soo much

bb_
Автор

Once again one more informative video thanks Pardeep

SandeepSingh-yefh
Автор

Absolutely brilliant. I have been searching for this information just yesterday. But I have been wondering, if you generate the apk, how does the env handles the variables? Does it inject it in the apk file or it stores it somewhere in the cloud? I'm just confused.

panshak
Автор

1:50 your key is hidden
2:05 your key is not hidden

monireol
Автор

Please make videos on redux with api calls

Bankiprudhvi
Автор

may i know what vscode theme do you use?

regapermana
Автор

can you please a video to run a project in a production environment and testing environment base on env

daljeetsingh
Автор

If the fix for @env not being found dosen't work try making a types folder then adding env.d.ts inside the types folder and then inside env.d.ts add
export const GEOCODING_API_KEY: string;
}
GEODCODING_API_KEY is the name of the key inside your .env
and then in tsconfig.json add "typeRoots": ["./src/types"],
This should fix the issue. I am using Expo instead of react native cli.

petercolquhoun
Автор

So the simple solution to that annoying problem is to re-start the computer. Thanks

piyush
Автор

does it prevent to reveal secret key from reverse engineering?

bestsongsreelsshortslatest
Автор

Great tutorial but I prefer react-native-config tho. Any reasons why react-native-dotenv over react-native-confg?

onibenjo
Автор

Hello Brother when i create react native project 0.69 or 0.70 version ios and android folder doesn't exist in my project pls help

yunusnazarov
Автор

I don't have api key in app.js file. How can I solve this problem?

ozlemmigfer
Автор

Sir please make a series on chatting application in react native cli, , not expo

Sooraj
Автор

Brother video coming on that topic ?


Hello brother, Can you make a video or playlist for ad implementation of google admob ads in react native apps ?
Like every kind of implementation of ads Interstitial, Rewarded, open app ads, videos ads etc based on conditional rendering like if ad is not loaded or maybe an error so in replacement we can display our custom component ads. like if interstital ads is somehow failed to show then we display our custom component that cover whole screen and displaying our custom component. It's a request to made a video or series on it specially interstitial, rewarded and openapp ads.

Also if you can create another tutorial for facebook ads then do that after admob tutorial. I have watched most of youtube videos for implementing ads of admob but it is not as much helpfull like I mention, Even interstitial and rewarded ads is not diplaying, getting error of fetching ads. So it'a a request made a video on it. It is also less competitive topic so you can also easily rank on youtube search engines for better channel ranking/performance.

It's a request please make a video that cover all the above mentioned topic. please

abdulsami
Автор

*This library is outdated and the .env variables will not work in production when release the app package for Android and iOS. So it's better to use react-native-config instead.*

xdrap
Автор

ur API key was still visible even after blurring lol

sanirasheedabdullah