Category - React

2019-11-14 07:46:24    26    0    0
> 参考: https://blog.csdn.net/sensyup/article/details/77749083
2019-11-14 07:46:24    3    0    0
> 参考: https://blog.csdn.net/u011413061/article/details/53561581
2019-11-14 07:46:24    13    0    0
> 参考: https://blog.csdn.net/qq_29311407/article/details/80897514
2019-11-14 07:46:24    21    0    0
### 1.内联方式 ``` const styles = { TodoComponent: { width: "300px", margin: "30px auto", backgroundColor: "#44014C", minHeight: "200px", boxSizing: "border-box", }, Header: { fontSize: "20px", } } clas
2019-11-14 07:46:24    16    0    0
> npm i pixi.js ### 使用: ``` import React, { Component } from 'react' import PropTypes from 'prop-types' import * as Pixi from "pixi.js" const styles = { box: { position: "relative",
2019-11-14 07:46:24    8    0    0
## **什么是高阶组件?** 高阶组件只是一个包裹了另一个组件的 React 组件。 注1:确切的说高阶组件是一种 React 组件模式,它是一个 JavaScript 函数,将组件作为参数并返回一个新组件。 ## **分为两类** 1. Props Proxy(属性代理) 2. Inheritance Inversion(反向继承)
2019-11-14 07:46:24    4    0    0
## 原因: 如果复制一个很复杂的对象给 `state` 或者 `props` 后, 由于 `js未深拷贝` 导致的 解决: 1. 触发了 state 或者 props 后, 手动调用 `this.forceUpdate()` 方法来强制更新渲染 2. 深拷贝数据, 再赋值更新 state 或者 props
2019-11-14 07:46:24    6    0    0
## **时间轴** - `react-vertical-timeline-component`
2/2