title: I did localstorage.setItem() in one component and i want to do localstorage.getItem() in second component
body: <p>I have 2 components in ReactJS and I did localstorage.setItem() in one component and I want to do localstorage.getItem() in second component. how should i do it. right now I did both setitem() and getItem() in the same component and passed the value of getItem using props to the second component. But I want to do getItem() in the second component is there any way to do so?</p>