I have setted this env variable in my .env
file and i want to save a value later. I'm using React.
REACT_APP_ID_USERLOGGED=""
Then i have this fragment of code that would have to save an id.
process.env.REACT_APP_ID_USERLOGGED = res.config.data
But if a do it, i receive this error Uncaught SyntaxError: invalid assignment left-hand side
So, which is the correct way to do that or how can i solve it?
EDIT: I'm trying to save the id into REACT_APP_ID_USERLOGGED
from a React Component, not into the .env file.