나는 Udemy : Reborn Native가있는 Re build Native 튜토리얼을 따르고 있습니다. Stephen Grider가 작성했습니다. 두 번째 자습서를 읽고 다음 코드를 작성했습니다. 현재 컴파일 중이 아니며 누군가이 코드가 현재 사용되지 않음을 알려주었습니다. 이 튜토리얼을 계속 진행하거나 더 나은 것을 찾아야할까요?원시 네이티브 튜토리얼은 더 이상 사용되지 않습니다
var React = require('react-native');
/*
var {
Text,
View,
AppRegistry
} = React;
*/
var AppRegistry = React.AppRegistry;
var Text = React.Text;
var View = React.View;
// same as:
// var Text = React.Text;
// var View = React.View;
var StopWatch = React.createClass({
render: function() {
return <View>
<Text>
00:00.00
</Text>
{this.startStopButon()}
{this.lapButon()}
</View>
},
startStopButon: function() {
return <View>
<Text>
Start
</Text>
</View>
},
lapButon: function() {
return <View>
<Text>
Lap
</Text>
</View>
},
}
});
AppRegistry.registerComponent('stopwatch', function() {
return StopWatch;
});
//AppRegistry.registerComponent('stopwatch',() => StopWatch);
더 이상 사용되지 않는 것은 아닙니다. 다른 문제가 있습니다. 어떤 버전의 React를 사용하고 있는지 언급하지 않았습니다. 오프 사이트 리소스에 대한 요청 또는 따라야 할 튜토리얼에 대한 질문은 주제에 벗어나 있습니다. –