wowlusitong / react-use-modal

A react component for manage modal

Home Page:https://react-use-modal.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

State changes does not update in the modal

ayepRahman opened this issue · comments

Hi, I am using redux for state management, what I do realize is that state changes example button loading is not shown in the modal button.

You can connect redux in Modal component

@connect() // react-redux
class CustomModal extends React.Component {
 render() {
   return (
     <Modal show={this.props.show} ...otherProps>
       test
     </Modal>
    )
  }
}
showModal(({show}) => (
  <CustomModal show={show} />
))