![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
React学习日志
React学习日志
amadeus_liu2
这个作者很懒,什么都没留下…
展开
-
jQuery: 设置同步发送请求
$.ajaxSettings.async = false;原创 2021-12-27 15:03:01 · 1595 阅读 · 0 评论 -
Log:2021-12-18
1.学习createElement的用法class Hello extends React.Component { render() { return React.createElement('div', null, `Hello ${this.props.person}`); }}ReactDOM.render(React.createElement(Hello,{person:'amadeus'},null),document.getElementById("root"));原创 2021-12-19 20:49:09 · 77 阅读 · 0 评论 -
Log:2021-12-13
1.学习antd弹出窗口组件Modal的使用import React, { createRef,useState,useEffect,useRef } from 'react';import ReactDOM from 'react-dom';import 'antd/dist/antd.css';import './index.css';import { Tabs } from 'antd';import $ from 'jquery'import Calendar from 'react-原创 2021-12-13 22:13:07 · 607 阅读 · 0 评论 -
Log:2021-12-10
1。学习简单的需求完成原创 2021-12-13 22:12:02 · 95 阅读 · 0 评论 -
React:Can‘t resolve ‘create-react-class‘
npm install create-react-class --save原创 2021-12-09 21:31:58 · 500 阅读 · 0 评论 -
Log:2021-12-09
1.学习属性展开class Person extends React.Component{ constructor(props){ super(props); } render(){ return( <div> <h1>{this.props.name}</h1> <h3>{this.props.location}</h3> </div> )原创 2021-12-09 10:06:21 · 187 阅读 · 0 评论 -
Log:2021-12-08
1学习JSX的点语法(Dot Notation)const MyFruits={ apple: function getApple(props){ return ( <div> <h1>this is an {props.color} apple!</h1> </div> ); } , orange: function getOrange(props){ return(原创 2021-12-08 20:59:50 · 681 阅读 · 0 评论 -
Log:2021-12-07
1。学习非受控组件的用法class CustomTextInput extends React.Component{ constructor(props){ super(props); this.handleSubmit=this.handleSubmit.bind(this); } handleSubmit(e){ e.preventDefault(); const val=this.refs.name; const dom=findDOMNode原创 2021-12-08 09:47:55 · 79 阅读 · 0 评论 -
Log:2021-12-06
1.学习ref的用法import React, { useState,useEffect,useRef } from 'react';import ReactDOM from 'react-dom';import 'antd/dist/antd.css';import './index.css';import { Button, Tabs } from 'antd';import $ from 'jquery'import { element } from 'prop-types';cl原创 2021-12-07 22:03:47 · 492 阅读 · 0 评论 -
Log:2021-12-03
1.学习React.fragment的用法(让Render()方法返回多个元素,不用fragment的话,编译报错)class Columns extends React.Component { render() { return ( <React.Fragment> <td>Hello</td> <td>World</td> </React.Fragment>原创 2021-12-03 14:37:55 · 367 阅读 · 0 评论 -
Log:2021-12-02
1.学习{props.children}的用法function ChildComponent(props){ return ( <div> {props.children} </div> );}function ParentComponent() { return ( <ChildComponent> <h1>abcd</h1> <h2>efgh</h2>原创 2021-12-02 21:22:46 · 97 阅读 · 0 评论 -
Log:2021-12-01
1.继续学习useState hook.function Counter({initialCount}) { const [count, setCount] = useState(initialCount); return ( <> Count: {count} <button onClick={() => setCount(initialCount)}>Reset</button> <button onC原创 2021-12-01 21:31:19 · 161 阅读 · 0 评论 -
Log:2021-11-30
1.默写简单的无状态组件2.学习useState hook原创 2021-11-30 21:38:35 · 187 阅读 · 0 评论