Check out example codes for "uwp roaming data sample". It will help you in understanding the concepts better.

Code Example 1

ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings;

roamingSettings.Values["lastViewed"] = DateTime.Now;

var lastViewed = (DateTime)roamingSettings.Values["lastViewed"];

Learn ReactJs, React Native from akashmittal.com