Is it ok from a performance point of view to call localStorage.getItem()
at render phase?
Like this:
function MyComponent() {
return (
<Button text={localStorage.getItem('my-key')} />
);
}
Is it ok from a performance point of view to call localStorage.getItem()
at render phase?
Like this:
function MyComponent() {
return (
<Button text={localStorage.getItem('my-key')} />
);
}