Используя реакцию маршрутизатора v4 с реакцией 16.5.2, запущенного с помощью create-реагировать на приложение, получая предупреждения о нагрузке и используя маршрутизатор, буду признателен за любые советы по этому вопросу, повторяющиеся предупреждения:
index.js:2178 Warning: You should not be using this.context.router.history directly. It is private API for internal use only and is subject to change at any time. Instead, use a <Route> or withRouter() to access the current location, match, etc.
index.js:2178 Warning: You should not be using this.context.router.location directly. It is private API for internal use only and is subject to change at any time. Instead, use a <Route> or withRouter() to access the current location, match, etc.
Warning: You should not be using this.context.router.match directly. It is private API for internal use only and is subject to change at any time. Instead, use a <Route> or withRouter() to access the current location, match, etc.
index.js:2178 Warning: You should not be using this.context.router.staticContext directly. It is private API for internal use only and is subject to change at any time. Instead, use a <Route> or withRouter() to access the current location, match, etc.
Полный код компонента: возврат (
<header className="header">
<div className="header__title">menu here</div>
<nav className="mq-navigation">
<ul className="mq-navigation__list">
<li className="mq-navigation__item">
<button className="mq-navigation__item" onClick={()=>this.setMainSize('d','p')}>Desktop</button>
</li>
<li className="mq-navigation__item">
<button className="mq-navigation__item" onClick={()=>this.setMainSize('t','l')}>Tablet l</button>
</li>
<li className="mq-navigation__item">
<button className="mq-navigation__item" onClick={()=>this.setMainSize('t','p')}>Tablet p</button>
</li>
<li className="mq-navigation__item">
<button className="mq-navigation__item" onClick={()=>this.setMainSize('m','l')}>Mobile l</button>
</li>
<li className="mq-navigation__item">
<button className="mq-navigation__item" onClick={()=>this.setMainSize('m','p')}>Mobile p</button>
</li>
</ul>
</nav>
<nav className="lessons-navigation">
<ul className="lessons-navigation__list">
<li className="lessons-navigation__item">
<NavLink to="/Lesson_1" className="lessons-navigation__link" activeClassName="active">Lesson 1</NavLink>
</li>
<li className="lessons-navigation__item">
<NavLink to="/Lesson_2" className="lessons-navigation__link">Lesson 2</NavLink>
</li>
<li className="lessons-navigation__item">
<NavLink to="/Lesson_3" className="lessons-navigation__link">Lesson 3</NavLink>
</li>
</ul>
</nav>
</header>
<main className="bkg-crop">
<div className={`stage stage-device--${this.state.currentResolution} stage-orientation--${this.state.orientation}`}
//dangerouslySetInnerHTML={{__html: sanitizeHtml(thisIsMyCopy)}}
>
<p>more html</p>
<Route path="/:page" render={(props) => {console.log(props,props.location.pathname,props.match.params.page);}} />
</div>
</main>
</Router>
</div>
);
enter code here