小编Nic*_* Bb的帖子

反应require(“ history”)。createBrowserHistory`而不是`require(“ history / createBrowserHistory”)

所以基本上我在使用历史库进行反应时遇到问题。

是否由于最新版本而导致我应尝试降级历史版本,但由于错误指出该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)

history.js reactjs react-router react-redux

14
推荐指数
2
解决办法
7788
查看次数

底部固定 div 被 Android 键盘推起

我在底部有一个固定的 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 的底部 在此输入图像描述

html css reactjs

7
推荐指数
1
解决办法
5770
查看次数

标签 统计

reactjs ×2

css ×1

history.js ×1

html ×1

react-redux ×1

react-router ×1