#Best practice on using local storage?
5 messages · Page 1 of 1 (latest)
Everytime u pull it from local storage, u need to deserialize it again. So even if the object didnt change, it will be a different object. That limits the amount of optimizations angular can do
So personally, I would store it at leasy in a service.
But you need to ensure u always have the latest values tho.
I don't know if there are best practices. I think it depends on the use case.
if you take it from a variable, you need to take into account what will happen if the data changes? is it a problem or not?