Best way to store user data in local storage?

What is the best way to store user data in the local Storage?

Storing data with individual property

'userId': '234353-645657-75675675-5575'
'token': 'fgdfgfggergverger.t45regverrgt.he'

or include all the user data inside a big json object.

{
   'userId': '',
   'token': ''
}
Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

No Comments Yet