Hi, I am having this error in react native and cannot figure out what is causing it. Help would be greatly appreciated.
Thank you
I encountered a similar error when checking whether to render a component in the following manner:
{somevariable && abcd }
Whenever somevariable was 0, that somevariable would be interpreted as something that was supposed to be rendered and thus 0 is an invalid React Element. To resolve this, I made sure that the first expression always evaluated to a boolean.
{!!somevariable && abcd }