摘要: Redux Single Data Source All states is stored in an Object Tree, and the Object Tree is stored in only one store Easy to maintain, track and modify St 阅读全文
posted @ 2020-12-02 17:04 北冥雪 阅读(108) 评论(0) 推荐(0) 编辑
摘要: React-CSS Inline Style import React, { PureComponent } from "react"; export default class App extends PureComponent { constructor(porps) { super(); th 阅读全文
posted @ 2020-12-02 17:01 北冥雪 阅读(444) 评论(0) 推荐(0) 编辑
摘要: Higher-Order Components (HOC) HOC is a function with arguments as component and return value as new function // index.js ReactDOM.render(<App name="Sm 阅读全文
posted @ 2020-12-02 17:00 北冥雪 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Controlled & Uncontrolled Components Data is handle by a React Component ? Controlled : Uncontrolled Controlled Components: The values in the componen 阅读全文
posted @ 2020-12-02 16:59 北冥雪 阅读(64) 评论(0) 推荐(0) 编辑
摘要: Ref import React, { PureComponent, createRef, forwardRef } from "react"; // Can't use ref in function components, it doesn't have instance // Use the 阅读全文
posted @ 2020-12-02 16:57 北冥雪 阅读(122) 评论(0) 推荐(0) 编辑