How to Use Env Variables Client-Side in NextJS (NEXT_PUBLIC)

preview_player
Показать описание
How to make environment variables public to use them client-side in NextJS.

📣 Follow Coding in Flow on social media:
Рекомендации по теме
Комментарии
Автор

This is what i have been looking for many days. Thanks bro

shajmanfaiz
Автор

Thank you bro, for the last 3 hours I have been trying to solve this. ❤

SahilAnsari-finance
Автор

thanks a lot bro. God bless u. Take a hi from Brazil

caiogabriel
Автор

thanks florian,
okay, i'll fixed this "no comment" into "has comment" 😊

iancikal
Автор

working in local, but not after build and deploy. how to fix it?

guru-xfxv
Автор

how do we access env variables from serviceWorker (public folder)?

wesleyyandotantra
Автор

can i use it to hide my apikey of an api call?

bnyman
Автор

but I don't get it? yes u can use it client with NEXT_PUBLIC but you should't beacause of leak? how do I do it on Clieant side securly?

levato
Автор

I wonder if I can init firebase on a nodejs app using gSSP function.

PostMeridianLyf
Автор

thanks, just lost 2 hours trying yo understand why my variables were undefined on the client components...

nickbubuioc