Check out example codes for "android clear specific sharedpreference value". It will help you in understanding the concepts better.

Code Example 1

SharedPreferences preferences = getSharedPreferences("Mypref", 0);
preferences.edit().remove("text").commit();

Learn ReactJs, React Native from akashmittal.com