就像這樣:render() { this.context.antLocale.locale = this.props.lng return <div></div>
}這樣寫可以達到效果,但不知道這樣寫符不符合規范
可不可以在react組件的render函數內直接修改context?
肥皂起泡泡
2019-02-05 19:49:47