0
說,在作出反應我有一個分量呈現爲這樣:純組分和風格/參考標籤
render() {
return (<AComponent ref={(ref) => { this.ref = ref}} style={{height: 110}} />);
}
我查道具兌nextProps,
componentWillReceieveProps(nextProps) {
if (this.props !== nextProps) {
this.setState({ ..this.getState(nextProps) });
}
}
他們會永遠不淺相等,因爲樣式道具正在被賦予一個對象字面值並且引用一個匿名函數?或者React有什麼地方不考慮道具的風格和參考標籤?如果是這樣,是否還有其他排除?