127
rated 0 times
[
130]
[
3]
/ answers: 1 / hits: 9162
/ 8 Years ago, mon, july 18, 2016, 12:00:00
So I am following a course on React Native that seems to be a little out of date.
Just trying to import a single component.
import React, { Component } from 'react';
import { AppRegistry, Text, View } from 'react-native';
import TaskList from './TaskList';
class AwesomeProject extends Component {
constructor(props, context) {
super(props, context);
this.state = {
todos:[
{
task:'Learn React Native'
},
],
};
}
render() {
return (
<TaskList />
);
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
TaskList.js
import React, { Component } from 'react';
const {
Text,
} = React;
class TaskList extends Component {
render() {
return (
<Text>Hi this is the TaskList!</Text>
);
}
}
export default TaskList;
I have looked around and I am not doing wrong what others where
More From » react-native