DEV Community

Discussion on: Type-safe environment variables on both client and server with Remix

Collapse
 
creeefs profile image
Christopher Lee

Thanks for the great post! Was it intentional to re-parse the schema every time you access an env var?

Collapse
 
gugaguichard profile image
Gustavo Guichard (Guga)

Hey Christopher! Thanks for the feedback. Yeah it is intentional. It can be improved but haven't felt the need when writing this post =)

Collapse
 
gugaguichard profile image
Gustavo Guichard (Guga)

Hey Christopher!
I have now revisited the code and created another post you might like. I incorporated your suggestion and created a little cache:
dev.to/seasonedcc/type-safe-env-va...

Cheers