Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

325
Views
Configuración del entorno nativo de Expo React

Voy a configurar algunas variables de entorno, algo así como la clave API. Estoy usando expo y babel.

He seguido la documentación de la exposición pero no tuve suerte. https://docs.expo.dev/guides/environment-variables/#from--babelconfigjs

Agradecería si alguien tiene un consejo al respecto. Aquí está mi babel.config.js Gracias.

 //babel.config.js module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: [ [ “module-resolver”, { “extensions”: [ “.js”, “.ts”, “.tsx”, “.css” ], “root”: [ “./src” ], “alias”: { “assets”: “./src/assets”, “type”: “./src/type”, } }, ], [ “inline-dotenv”, { path: '.env' } ] ] }; }; //.env API_KEY=something //const.js export const THIRDPARTY = { api_key: process.env.API_KEY, } //home.js useEffect(() => { console.log("env_api_key", THIRDPARTY.api_key); ////////undefined/////// })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!