函数式组件

函数式组件有一个限制,即函数式组件必须在定义的时候导出, 如下:

// 1
export default A = (props) => {}

// 2
export default function A(props) {}

// 3
export default A = (props) => {}

// 4
export default A = function(props) {}

A.contextTypes = {...}

results matching ""

    No results matching ""