Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • Is the id a number? It has to be a string. Commented May 8, 2017 at 22:40
  • @AndrewLi it has nothing to do with the type of the id I want pass the age for example but It won't It accepts only string Commented May 8, 2017 at 22:41
  • What do you mean it has nothing to do with type? The problem is the type -- the value must be a string. Commented May 8, 2017 at 22:42
  • @AndrewLi it has nothing to do with the type of the ID, even this "AsyncStorage.setItem('number',15);" will get the same error. Commented May 8, 2017 at 22:44
  • It has all to do with the type! In your counterexample, the second argument is still a number! It can't be a number! That's what the error is saying! Commented May 8, 2017 at 22:45