How To Implement Environment Variables in React Native

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2022
  • 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.
    Dynamic Dropdown List in React Native • Dynamic Dependent Drop...
    → Social App with Firebase in React Native Playlist • Social App with Fireba...
    → React navigation v5 tutorial playlist • React Navigation 5 Tut...
    → Food Finder App in React Native Playlist • Food Finder App in Rea...
    → Music App UI Tutorial • Music App UI in React ...
    GitHub repo URL bit.ly/3cMlAHR
    If you found my tutorials helpful, you can buy me a coffee from this link paypal.me/itzpradip
    Follow me on Twitter / itzpradip
    Follow me on GitHub github.com/itzpradip
    Subscribe to my Channel bit.ly/2PaUqOk
    For more tutorials on WordPress, React JS, React Native and Flutter visit: www.pradipdebnath.com/blog/

ความคิดเห็น • 33

  • @rayyanwz

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

  • @lrajoo11
    @lrajoo11 ปีที่แล้ว

    Super helpful. thank you sir!

  • @KlethonioFerreira
    @KlethonioFerreira ปีที่แล้ว +3

    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

  • @SandeepSingh-ye5fh
    @SandeepSingh-ye5fh ปีที่แล้ว

    Once again one more informative video thanks Pardeep

  • @panshak
    @panshak ปีที่แล้ว

    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.

  • @joaov5267

    great video thanks brother

  • @regapermana8023
    @regapermana8023 ปีที่แล้ว

    may i know what vscode theme do you use?

  • @alexinsaev
    @alexinsaev ปีที่แล้ว

    Thx for your content!

  • @saeidghorbani4388

    thank you

  • @b0b0_

    Abolute Legend my gut. Thanks soo much

  • @monireol
    @monireol ปีที่แล้ว +4

    1:50

  • @yunusnazarov4319
    @yunusnazarov4319 ปีที่แล้ว

    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

  • @bestsongsreelsshortslatest1170
    @bestsongsreelsshortslatest1170 ปีที่แล้ว

    does it prevent to reveal secret key from reverse engineering?

  • @daljeetsingh5127
    @daljeetsingh5127 ปีที่แล้ว

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

  • @ozlemmigfer755
    @ozlemmigfer755 ปีที่แล้ว

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

  • @Bankiprudhvi
    @Bankiprudhvi ปีที่แล้ว +2

    Please make videos on redux with api calls

  • @piyush9688
    @piyush9688 ปีที่แล้ว +1

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

  • @petercolquhoun1809
    @petercolquhoun1809 ปีที่แล้ว +3

    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

  • @onibenjo
    @onibenjo ปีที่แล้ว +1

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

  • @xdrap1
    @xdrap1  +2

    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.