I’m building twitter clone, and I store logged in user information in local storage. It works on local environment(localhost:3000). But after I deployed on
render.com
, it doesn’t work properly.
When you log in, the logged in user information should be stored in local storage.
I checked local storage, and there are no key and value. And I logged user info just in case but it says ‘null’ .
But when I refresh the browser, it logs correct information from local storage, but in local storage in application section, there are no key and value. It seems it exists in local storage but it can’t be seen.
Why it returns null even when data exists(it can’t be seen though) in localStorage in first rendering on production mode?
//ProfileSide.js
const user = JSON.parse(localStorage?.getItem('profile'));console.log('user is ' + user) //it's null even when data exists in localStorage on production mode
Hi there,
This is an application issue and not a Render platform issue, we are here to provide support for Render the platform and not the code running on it,
Regards,
John B