am having a trouble
i do have a popup in my BrowseModalUpload component and i had given state as
class BrowseModalUpload extends React.Component {
constructor(props) {
super(props)
this.state = {
modalIsOpen: this.props.browseAssetComponent ? this.props.browseAssetComponent : false,
...
}}
So initially there is no popup and when you click on one link , setState modalIsOpen to true and modal opens-thats the normal flow
And when i click in close window ,it setState modalIsOpen to false.
So i just clicked on popup it came and i click on close button it goes ,now i click this popup from different component having prop browseAssetComponent as true ,it didn't open up
code for modal is like this
<Modal transparent isOpen={this.state.modalIsOpen} onAfterOpen={this.afterOpenModal} onRequestClose={this.closeModal} ariaHideApp={false}>
this this.state.modalIsOpen is still false,it not gets updated when i call the same from another component and this popup not coming up.
if you guys need more information let me know. any help will be way to solve my roadblock
componentDidUpdatemethod of the React.Component class is being called with previous and current props. - Mario Subotic