Check out example codes for "membership get user id". It will help you in understanding the concepts better.

Code Example 1

MembershipUser mu = Membership.GetUser("username");
string userId = mu.ProviderUserKey.ToString();

Learn ReactJs, React Native from akashmittal.com