I have a very basic responsive application that I am currently creating using the create-react-app, and this is the code:
index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route } from 'react-router';
import createBrowserHistory from 'history/createBrowserHistory';
import App from './App/AppComponent';
const browserHistory = createBrowserHistory();
ReactDOM.render(
<Router path="/" history={browserHistory}>
<div>
<Route path="/" component={App} />
</div>
</Router>, document.getElementById('root')
);
AppComponent.js
import React, { Component } from 'react';
class App extends Component {
render() {
return (
<div>This is the App component</div>
);
}
}
export default App;
And I get the following warning in the console when starting this application:
bundle.js:11888 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
When I delete the reaction-related material related to the router, I do not seem to receive a console warning, so I assume that it comes from this package ... but I used it in another small application earlier and did not have an error. so I'm a little confused.
What am I missing here?
source
share