I'm trying to use DND for 2 containers.
1) container have static data form axios => tasks list. 2) container have only tasks which were set to user.
<Container id={1} list={this.props.tasks}/>
<Container id={2} list={this.state.userTasks}/>
When I change user (by select) X => Y I have to refresh data for Container(2).
My this.state.userTasks
is refreshing but child component Container(2) still have the same elements.
This is because I use constructor to pass data. Constructor is call once. I know it.
constructor(props) {
super(props);
this.state = {cards: props.list};
}
I can't use componentWillReceiveProps(nextProps)
into Container (child) because I have to update only Container(2) and this method is calling when I move element from Container to Container(2)
How to update Container(2) cards when I change user? Do you have any ideas?