Check out example codes for "set array of objects in localstorage". It will help you in understanding the concepts better.

Code Example 1

//set item in local storage
localStorage.setItem("savedData", JSON.stringify(objects));

//retrieve item from local storage
objects = JSON.parse(localStorage.getItem("savedData")));

Learn ReactJs, React Native from akashmittal.com