auto commit

This commit is contained in:
DuYi 2024-08-27 10:10:05 +08:00
parent c09ae961b5
commit 46dce38662
1747 changed files with 1747 additions and 732 deletions

View File

@ -184,4 +184,4 @@
2-27. bailout与ContextAPI
2-28. 性能优化对日常开发启示
2-28. 性能优化对日常开发启示

View File

@ -90,3 +90,4 @@ cd my-app
npm start
```

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -5,3 +5,4 @@ function App() {
}
export default App;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -80,4 +80,4 @@ const element2 = React.createElement(
---
-*EOF*-
-*EOF*-

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -106,3 +106,4 @@ function App() {
}
export default App;

View File

@ -10,4 +10,4 @@ function Hello(props) {
);
}
export default Hello;
export default Hello;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -117,4 +117,4 @@ eventHandler(e){
如果要传递参数,可以使用下面的两种方式来进行传参:
- 通过 *bind* 方法在绑定 *this* 指向时向事件处理函数进行传参
- 绑定事件时,通过书写箭头函数的形式来传参
- 绑定事件时,通过书写箭头函数的形式来传参

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -53,3 +53,4 @@ function App() {
// }
export default App;

View File

@ -10,4 +10,4 @@ function Hello(props) {
);
}
export default Hello;
export default Hello;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -68,3 +68,4 @@ class App extends React.Component {
}
export default App;

View File

@ -6,4 +6,4 @@ function Button(props) {
);
}
export default Button;
export default Button;

View File

@ -26,4 +26,4 @@ Hello.defaultProps = {
}
export default Hello;
export default Hello;

View File

@ -38,4 +38,4 @@ World.propTypes = {
export default World;
export default World;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -361,3 +361,4 @@ export default App;
关于受控组件和非受控组件,可以参阅:*https://goshacmd.com/controlled-vs-uncontrolled-inputs-react/*

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -27,3 +27,4 @@ class App extends React.Component {
}
export default App;

View File

@ -6,4 +6,4 @@ function Button(props) {
);
}
export default Button;
export default Button;

View File

@ -26,4 +26,4 @@ Hello.defaultProps = {
}
export default Hello;
export default Hello;

View File

@ -18,4 +18,4 @@ function Money(props) {
);
}
export default Money;
export default Money;

View File

@ -38,4 +38,4 @@ World.propTypes = {
export default World;
export default World;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -81,4 +81,4 @@ export default App;
- 可以使用 *setState*
- 通常情况下,会将网络请求、启动计时器等一开始需要的操作,书写到该函数中
- *componentWillUnmount*
- 通常在该函数中销毁一些组件依赖的资源,比如计时器
- 通常在该函数中销毁一些组件依赖的资源,比如计时器

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -48,3 +48,4 @@ class App extends React.Component {
}
export default App;

View File

@ -6,4 +6,4 @@ function Button(props) {
);
}
export default Button;
export default Button;

View File

@ -19,4 +19,4 @@ class Child extends React.Component {
}
}
export default Child;
export default Child;

View File

@ -26,4 +26,4 @@ Hello.defaultProps = {
}
export default Hello;
export default Hello;

View File

@ -18,4 +18,4 @@ function Money(props) {
);
}
export default Money;
export default Money;

View File

@ -38,4 +38,4 @@ World.propTypes = {
export default World;
export default World;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -346,3 +346,4 @@ function useMyBook(){
export default useMyBook;
```

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -16,3 +16,4 @@
<div id="root"></div>
</body>
</html>

View File

@ -25,4 +25,4 @@ function App() {
}
export default App;
export default App;

View File

@ -6,3 +6,4 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<App />
);

View File

@ -7,4 +7,4 @@ function useMyBook(){
}
}
export default useMyBook;
export default useMyBook;

View File

@ -39,3 +39,4 @@
整个 *React-router*,我们将写一个学生管理系统,用到什么讲什么。

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -48,3 +48,4 @@ function App() {
}
export default App;

View File

@ -31,4 +31,4 @@ request.interceptors.response.use((response) => {
return Promise.reject(error);
});
export default request;
export default request;

View File

@ -7,4 +7,4 @@ export function getStuListApi(){
url : "/students",
method : "GET",
})
}
}

View File

@ -9,4 +9,4 @@ function About() {
);
}
export default About;
export default About;

View File

@ -8,4 +8,4 @@ function Add(props) {
);
}
export default Add;
export default Add;

View File

@ -59,4 +59,4 @@ function Home(props) {
);
}
export default Home;
export default Home;

View File

@ -28,4 +28,4 @@ a{
tr,th{
text-align: center;
}
}

View File

@ -9,3 +9,4 @@ root.render(
<App />
</BrowserRouter>
);

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -51,3 +51,4 @@ function App() {
}
export default App;

View File

@ -31,4 +31,4 @@ request.interceptors.response.use((response) => {
return Promise.reject(error);
});
export default request;
export default request;

View File

@ -47,4 +47,4 @@ export function editStuByIdApi(id, data){
method : "PATCH",
data
})
}
}

View File

@ -9,4 +9,4 @@ function About() {
);
}
export default About;
export default About;

View File

@ -183,4 +183,4 @@ function AddOrEdit(props) {
);
}
export default AddOrEdit;
export default AddOrEdit;

View File

@ -15,4 +15,4 @@ function Alert(props) {
);
}
export default Alert;
export default Alert;

View File

@ -84,4 +84,4 @@ function Detail(props) {
);
}
export default Detail;
export default Detail;

View File

@ -85,4 +85,4 @@ function Home(props) {
);
}
export default Home;
export default Home;

View File

@ -35,4 +35,4 @@ th {
position: relative;
top: 2px;
margin-right: 10px;
}
}

View File

@ -9,3 +9,4 @@ root.render(
<App />
</BrowserRouter>
);

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -40,3 +40,4 @@ function App() {
}
export default App;

View File

@ -31,4 +31,4 @@ request.interceptors.response.use((response) => {
return Promise.reject(error);
});
export default request;
export default request;

View File

@ -47,4 +47,4 @@ export function editStuByIdApi(id, data){
method : "PATCH",
data
})
}
}

View File

@ -14,4 +14,4 @@ function About() {
);
}
export default About;
export default About;

View File

@ -183,4 +183,4 @@ function AddOrEdit(props) {
);
}
export default AddOrEdit;
export default AddOrEdit;

View File

@ -15,4 +15,4 @@ function Alert(props) {
);
}
export default Alert;
export default Alert;

View File

@ -84,4 +84,4 @@ function Detail(props) {
);
}
export default Detail;
export default Detail;

View File

@ -8,4 +8,4 @@ function Email(props) {
);
}
export default Email;
export default Email;

View File

@ -85,4 +85,4 @@ function Home(props) {
);
}
export default Home;
export default Home;

View File

@ -8,4 +8,4 @@ function Tel(props) {
);
}
export default Tel;
export default Tel;

View File

@ -35,4 +35,4 @@ th {
position: relative;
top: 2px;
margin-right: 10px;
}
}

View File

@ -9,3 +9,4 @@ root.render(
<App />
</BrowserRouter>
);

View File

@ -51,4 +51,4 @@ function Router(props) {
]);
}
export default Router;
export default Router;

View File

@ -68,3 +68,4 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

View File

@ -53,3 +53,4 @@ export default function App() {
</div>
);
}

View File

@ -24,3 +24,4 @@ request.interceptors.response.use(
);
export default request;

View File

@ -41,3 +41,4 @@ export function editUserApi(id, data) {
data,
});
}

View File

@ -5,4 +5,4 @@ export default function About() {
<p>通过此系统来熟悉 react 以及 react router 的使用</p>
</div>
);
}
}

View File

@ -180,4 +180,4 @@ export default function AddOrEdit(props) {
</form>
</div>
);
}
}

View File

@ -7,4 +7,4 @@ export default function Alert(props) {
<strong>提示</strong> {props.alert}
</div>
);
}
}

View File

@ -80,4 +80,4 @@ export default function Detail(props) {
</ul>
</div>
);
}
}

Some files were not shown because too many files have changed in this diff Show More