所以基本上我在使用历史库进行反应时遇到问题。
是否由于最新版本而导致我应尝试降级历史版本,但由于错误指出该Support for the latter will be removed in the next major release.如何更改以及应该在哪里更改?
它说:
Warning: Please use `require("history").createBrowserHistory` instead of `require("history/createBrowserHistory")`. Support for the latter will be removed in the next major release.
Run Code Online (Sandbox Code Playgroud)
和
Warning: Please use `require("history").createHashHistory` instead of `require("history/createHashHistory")`. Support for the latter will be removed in the next major release.
Run Code Online (Sandbox Code Playgroud)
我不太确定如何解决它。
import createHistory from './history'
import { applyMiddleware, compose, createStore } from 'redux'
import { routerMiddleware } from 'connected-react-router'
import { persistStore, persistReducer } from …Run Code Online (Sandbox Code Playgroud) 我在底部有一个固定的 div,但在响应视图中,在 android 中,它被键盘推上来。
const ContactBackgroundImage = styled.div`
color: white
padding: 50px
height: 118px
position: fixed
bottom: 0
left: 0
right: 2px
text-align: left
background-position: top
background-repeat: no-repeat
background-image: url('/Images/background.png');
@media (max-width: 480px) {
background-position: left top
}
`;
Run Code Online (Sandbox Code Playgroud)
然后我的 div 正在渲染它。
<ContactBackgroundImage/>
Run Code Online (Sandbox Code Playgroud)
当应用程序在 Android 手机中处于响应模式时,键盘会将 div 向上推。我希望 div 留在 kaboard 的底部
