Archived
test
This commit is contained in:
+6
-1
@@ -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
@@ -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;
|
||||
Reference in New Issue
Block a user