This commit is contained in:
matteo
2018-11-14 15:08:21 +01:00
parent 78857bb1c5
commit d2c592d18d
4 changed files with 83 additions and 21 deletions
+6 -1
View File
@@ -5,6 +5,7 @@ import { Row, Col } from 'react-bootstrap'; // eslint-disable-line no-unused-var
import VideoList from './VideoList'; // eslint-disable-line no-unused-vars
import TopBar from './TopBar'; // eslint-disable-line no-unused-vars
import VideoPlayer from './VideoPlayer'; // eslint-disable-line no-unused-vars
import Test from './Test';
import './App.css';
class App extends React.Component {
@@ -22,7 +23,11 @@ class App extends React.Component {
</Col>
</Row>
<Row>
<VideoList />
<Switch>
<Route path="/wikipedia" component={Test} />
<Route exact path='/' component={VideoList} />
</Switch>
</Row>
</React.Fragment>
);
+50
View File
@@ -0,0 +1,50 @@
import React, { Component } from 'react';
import wikijs from 'wikijs';
//import PropTypes from 'prop-types';
class Test extends Component {
constructor(props) {
super(props);
}
componentWillMount() {
}
componentDidMount() {
wikijs.find('star wars').then(data => console.log(data.results.length));
}
componentWillReceiveProps(nextProps) {
}
shouldComponentUpdate(nextProps, nextState) {
}
componentWillUpdate(nextProps, nextState) {
}
componentDidUpdate(prevProps, prevState) {
}
componentWillUnmount() {
}
render() {
return (
<div>
</div>
);
}
}
Test.propTypes = {
};
export default Test;