假如一个jsx文件内,使用的是这样的方式
const A = ({abc}) => {
return (
<div>{abc}</div>
);
};
export default BottomNavMU;
shouldComponentUpdate这类的方法能在这种形式的写法内用吗? 还是只能在 component extend React.Component这种写法里用?
假如一个jsx文件内,使用的是这样的方式
const A = ({abc}) => {
return (
<div>{abc}</div>
);
};
export default BottomNavMU;
shouldComponentUpdate这类的方法能在这种形式的写法内用吗? 还是只能在 component extend React.Component这种写法里用?
1 回答1.8k 阅读✓ 已解决
4 回答1.8k 阅读✓ 已解决
2 回答1.7k 阅读✓ 已解决
4 回答1.4k 阅读
4 回答1.1k 阅读
1 回答1.6k 阅读✓ 已解决
1 回答1.6k 阅读✓ 已解决
stateless component不支持lifecycle(包括shouldComponentUpdate)方法。