When writing a component, I suddenly got a very strange error in my IOS simulator: \"cannot adjust current top of stack beyond available views\"
Here is my code:
Okay, so it turns out this happens in React-Native when you misspell the component name. My imported class, Separator
should have been spelled Seperator
and my linter and the build system did not catch the error. Apparently if you try to use an object that is undefined in React-native, this is the error you get!
Expanding on the observation you made, this error can occur more generally whenever you reference or misspell a name. It is not limited to only Component names.
for example, if you create a styles
object to hold your styles, but accidentally refer to it as style
, then you will also see this error thrown.