Hello guys.
I have a very weird problem and maybe you can help me to find the answer.
I’ve tried to reinstall CRNA, update Node and everything else, but nothing helps.
I’m creating absolutely new application by CRNA and trying to check the code like this on my Iphone7 using Expo application:
import React from 'react';
import { ScrollView, Text } from 'react-native';
export default class App extends React.Component {
constructor(props) {
super(props)
this.myView = React.createRef()
}
componentDidMount() {
console.log(this.myView.current)
}
render() {
return (
<ScrollView ref={this.myView}>
<Text>Hello</Text>
</ScrollView>
)
}
}
When I use “Debug Remote JS” everything works fine, but if I try to run application not in my browser happens weirds things. Expo application freeze, in “Performance Monitor” RAM is getting higher (memory loop) and Expo application crashing.
I’ve tried to use diefferent code (string refs, callbacks, React.createRef), getting ref in child component. Nothing helps. Till I don’t use “ref” my application works perfect, but how can I use methods of components then?