Check out example codes for "unity persistent data". It will help you in understanding the concepts better.

Code Example 1

private int health;

private void Load()
{
    if(PlayerPrefs.HasKey("health"))
    {
        health = PlayerPrefs.GetInt("health");
    }
}

private void Save()
{
    PlayerPrefs.SetInt("health", health);
    PlayerPrefs.Save();
}

Learn ReactJs, React Native from akashmittal.com