callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.49k stars 2.05k forks source link

TextInput right operand of 'in' is not an object #4294

Open nimeshmaharjan1 opened 5 months ago

nimeshmaharjan1 commented 5 months ago

Current behaviour

Getting this, "Right operand of 'in' is not and object" error after when using the TextInput component from react native paper. If I remove the TextInput component the app works fine. The TextInput from react-native is working though

How to reproduce?

Just a newly created expo project with react native paper and rendering the TextInput component

Preview

image

Your Environment

software version

| react-native | 0.73.2 | react-native-paper | 5.12.1 | expo sdk | 50.0.1 | react | 18.2.0

AnMiZa commented 5 months ago

Hey @nimeshmaharjan1 can You share Your TextInput code that causes that error?

nimeshmaharjan1 commented 5 months ago

Hey @nimeshmaharjan1 can You share Your TextInput code that causes that error?

It doesn't highlight the TextInput as an error but if I have the TextInput component then the above error is shown

harbouli commented 5 months ago

The same Issue TextInput from react native paper not working

Aztaro97 commented 5 months ago

I'm facing the same issues with Searchbar components using Expo SDK 50.0.2

Aztaro97 commented 5 months ago

@nimeshmaharjan1 , I was able to fix the problem after following this 👉 solution #756

TAQ2 commented 3 months ago

@Aztaro97 sorry I'm a react native noob - how would you apply the fix? don't we need to wait until react-native-paper update their nativewind dependency?

gyanbhartip commented 1 month ago

Could someone please explain why does this fix work? Even if short-circuiting is used, it would return a false instead of undefined (after the solution). But Does react-native not accept false as a value in style array? Why would it fail?