Article From:

visibleCan’t control the display and hide, always show on the page, I used to control the display and hide components, can’t control the Div.

Answer 0:

1、Modification status is not correct.


Change into

this.setState(prevState => ({
    QRList: !prevState.QRList

2、The visible you mention should be props for other people’s components, if you write it yourself, implemented or modified with the visibility of CSS

{this.state.QRList && (
        The contents of the display...< /div>}

Leave a Reply

Your email address will not be published. Required fields are marked *