React require(“history”).createBrowserHistory` instead of `require(“history/createBrowserHistory”)

匿名 (未验证) 提交于 2019-12-02 23:56:01

看见bug惊讶,代码中并没有require(“history/createBrowserHistory”)

//原有代码为 import createBrowserHistory from "history/createBrowserHistory"; const customHistory = createBrowserHistory();

bug解决方式为

import {createBrowserHistory} from 'history' const customHistory = createBrowserHistory();

本文借鉴自:https://stackoverflow.com/questions/55466802/react-requirehistory-createbrowserhistory-instead-of-requirehistory-crea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!