there is my container which is getting state via redux store .
I am passing this state to modal box via props like this : Example:
render(){
let {team,id} =this.props.data;
return(
<div>
<ModalExample isOpen={this.state.isOpen} team={team} id={id}
modalClose={this.modalClose.bind(this)}
handleAddTeam={this.handleAddTeam.bind(this)}/>
</div>
)}
for the first time its working perfectly... There is team list and input field with add button inside modal box.so, when i do certain add method inside Modalbox component and update state ,there i can see state change in reduxDevTool and even state is change in mapStateToProps but Modal box team list is not updated or say modalbox props doesnt recieve new props as per state change...
even in this container
render(){
let {team,id} =this.props.data;
console.log(this.props.data) **//Here state change is shown**
console.log(team) **//Here state is not changed**
return(
<div>
<ModalExample isOpen={this.state.isOpen} team={team} id={id}
modalClose={this.modalClose.bind(this)}
handleAddTeam={this.handleAddTeam.bind(this)}/>
</div>
)}
plus i've tried to pass props inside ModalExample via both this way
team={this.props.data} , team={team}
but still ModalExample view is not updating..
Confusing : If i close and open the ModalBox or type inside input field of modal box ,then there is change in view as per our new state... But i want instant modal box view render as per our redux state change...