react-native-autofocus
react-native-autofocus copied to clipboard
iOS release build crashes: null is not an object (evaluating 'this._component.getScrollableNode')
I narrowed this crash in a production iOS app down to this library. I believe it has to do with the implementation of Input
instead of using a TextInput
though I'm not 100% sure about that.
You can find the whole, ongoing thread of this error at RN Issue #10635. Many of the cases have to do with Touchable
variety buttons not wrapping children in a View
.
Update: I can confirm that this is the case for iOS and Android -
"react": "16.0.0-alpha.12"
"react-native": "0.47.2"
"react-native-autofocus": "0.0.6"
Not really sure what you want me to do here, all the component does is pass some props through to a normal textinput https://github.com/zackify/react-native-autofocus/blob/master/text-input.js
I'm not sure what the solution is but it can't be used in production so I had to post an issue.
I think I might have and idea now that you mention it :) I’ll mess around with it soon On Thu, Dec 28, 2017 at 20:36 Phil Andrews [email protected] wrote:
I'm not sure what the solution is but you can't put it into production so I had to post an issue.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/zackify/react-native-autofocus/issues/5#issuecomment-354396874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbacCwizpJIhq2VFSQEHHsAd9zn3W1Tks5tFGxjgaJpZM4ROAeH .
-- Thanks,
Zach Silveira Senior Partner Encryption, Inc https://encryption.io/ Office: 404-602-0322
+1
On the latest version of React Native,
import React from 'react';
import { Form, TextInput } from 'react-native-autofocus';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Form>
<TextInput placeholder="test" />
<TextInput placeholder="test2" />
</Form>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Works just fine:
maybe a version of RN in between broke it, but appears to be fine now?