阅读背景:

在模态/覆盖反应组件中使用React componentDidMount

来源:互联网 
import { Component } from 'react'

export default class Overlay extends Component {

    static propTypes = {
       show: React.PropTypes.bool
    };

    constructor(props, context) {
        super(props);
    }

    render() {
        const { show } = this.props;
        return (
            <div id="overlay">
                    {show &&
                        this.props.children
                    }
            </div>
        )
    }
}
import { Component } from 'react'

export defau



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: