• React路由页面刷新404

    nginx配置 跟vue的配置差不多, Vue路由页面刷新404问题:https://www.blyoo.com/2934.html server { ... location / { try_files $uri /index.html; } }

    学习 2019-06-06 3548

  • Attempted import error: ‘Link’ is not exported from ‘react-router’.

    根据官方文档这么引入 import { Router, Route, Link } from 'react-router' 但是,报这个错误:Attempted import error: 'Link' is not exported from 'react-router'. 需要这么做 安装react-router-dom npm i react-router-dom -S 引入 import …

    学习 2019-04-26 5919

  • When specified, “proxy” in package.json must be a string.

    When specified, "proxy" in package.json must be a string. Instead, the type of "proxy" was "object". Either remove "proxy" from package.json, or make it a string. 配置React跨域时候 在网上看到是这样配置的,在package.json…

    学习 2019-03-16 9740

  • React 全家桶安装

    安装 npm install -g create-react-app 创建my-app项目 create-react-app my-app 进入my-app目录 cd my-app 启动 npm start 生成 npm run build

    学习 2019-03-07 2551

  • React 阻止默认事件和阻止冒泡

    首先有这样一段代码, 很久很久以前有这样一个故事,这要从远古时代说起 fn和fn1是一对父子 div是parent,span是children fn是子,fn1是父 最近在学react 首先 ... fn(ev){ alert('children') } fn1(ev){ alert('parent') } render() { return children } ... 一般情况下,原生js写法…

    学习 2019-03-07 9821