react
文章平均质量分 56
螺丝钉tina
这个作者很懒,什么都没留下…
展开
-
[react][react-router-dom]A <Route> is only ever to be used as the child of <Routes> element
目录背景操作参考链接背景制作简书项目,router报错import React, { Component } from 'react';import Header from './common/header';import { GlobalIcon } from './statics/iconfont/iconfont.js'import store from './store';import { Provider } from 'react-redux';import { Routes,原创 2021-12-22 09:00:23 · 207 阅读 · 0 评论 -
[React]export ‘injectGlobal‘ (imported as ‘injectGlobal‘) was not found in ‘styled-components‘
目录背景操作背景react做简书项目中遇到这个问题操作把injectGlobal 改为createGlobalStyle在v4中,injectGlobal API被移除,并被createGlobalStyle取代。原创 2021-12-20 19:47:55 · 1004 阅读 · 3 评论 -
[React]Element type is invalid: expected a string (for built-in components) or a class/function
目录背景操作背景react+redux做todolist项目中遇到这个问题操作安装报错提示信息,把app改为function或者class// const App = (// <Provider store={store}>// <TodoList />// </Provider>// )function App() { return <Provider store={store}>原创 2021-12-20 14:36:28 · 661 阅读 · 0 评论 -
Reac入门
目录Reac入门JS复习历史基础语法数据类型和变量Number字符串boolean比较运算符null和undefined数组对象变量和字符串变量模板字符串条件判断和循环if elsefor / while循环函数的定义与调用函数定义调用函数安装ReactCreate React Appreact 特性Hello WorldJSX优点DOMReac入门react私人学习笔记,内容来自网络搜索,js和react官网,仅供学习使用JS复习历史JS历史• 1995年网景公司的Brendan Eich1原创 2021-04-12 11:14:02 · 585 阅读 · 0 评论 -
将react项目部署到Github pages
目录操作准备环境视频操作首先在github上创建一个仓库,然后clone到本地,在本地目录创建一个react项目,最后把react项目部署到github pages页面。准备环境github上面创建一个仓库克隆到本地git clone xxxxx创建一个react项目,在上面仓库的目录下面,比如仓库名字react_learn,就在react_learn/下创建一个react项目npx create-react-app appcd appnpm install安装原创 2021-01-13 11:42:21 · 2225 阅读 · 0 评论