cruxf / studyreact Goto Github PK
View Code? Open in Web Editor NEWReact学习站点
React学习站点
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Wave which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
是因为 react 中的严格模式: StrictMode
在index.js中挂载 App 的外面有这样一个标签<React.StrictMode>
,只要把这个标签删除掉就可以了
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
“webpack”: “4.29.6”
Don’t try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:
/Users/mac/Desktop/node_modules/webpack (version: 3.8.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
在react-cli项目里面添加.env文件,文件中添加SKIP_PREFLIGHT_CHECK=true,在运行npm start。错误提示里又说这样可以解决目前问题,可能还会出现其他问题,暂时没遇到。
is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
在主文件中调用组件,组件的名称不能用小写,只能使用大写
// error
import React from 'react';
import ReactDOM from 'react-dom';
mport routeDemo from './pages/routeDemo/reoute1/Home';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<routeDemo />, document.getElementById('root'));
serviceWorker.unregister();
// success
import React from 'react';
import ReactDOM from 'react-dom';
mport RouteDemo from './pages/routeDemo/reoute1/Home';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<RouteDemo />, document.getElementById('root'));
serviceWorker.unregister();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.