标签归档:react

首页 » Posts tagged 'react'

thunkli

Higher-Order Components与 Render Props

Higher-Order Components 这里是一个响应鼠标事件的Higher-Order Components例子: import React from ‘react’ import ReactDOM from ‘react-dom’ const withMouse = (Component) => { return class extends React.Component { state = { x: 0, y: 0 } handleMouseMove = (event) =& … 继续阅读

发表在 Memo | |