react父组件传入子组件的props不更新问题

export default class Index extends Component {
    // 接受新props更新,注意设置的参数是nextProps
    componentWillReceiveProps(nextProps) {
        this.setState({
            isShow: nextProps.isShow
        });
    }
    constructor() {
        super(...arguments)
        this.state = {
            isShow: false,
        }
    }
    render() {
        const { isShow } = this.state;
        return (
            <View className={isShow ? "show" : "hide"}>
             
            </View>
        )
    }
}

参考:React中传入组件的props改变时更新组件的几种实现方法 - SegmentFault 思否