createContainer calls constructor on update


OK, so I have a new issue that is halting my progress. I have one screen where I am doing drag and drop using rubaxa:sortable. This screen is also reactive (wrapped with createContainer) as changes to the data can come in at any time.

On drag end, I make a method call to mongo to update the db and then just let the page re-render itself based upon the new data, which currently works fine. However, when the new data comes in, it calls constructor again without calling any of the other built-ins to react components, which not only wipes out my sortable instances, but also prevents it from being re-added.

Put another way, I put in console.log calls in constructor, componentWillReceiveProps and componentDidUpdate. When I first go to this page, I see printed: “constructor, will receive, did update, did update”. Everything works initially here. Then, I drag an item to a new list and I see “constructor” printed. After this, nothing drags anymore and my state variable where I was storing all the sortable instances, is now gone.

I am just calling sortable from the component and not using the unoffical wrapper, so I may try that. However, I am also just confused about the order of events here, since I would expect the updated data to call componentWillReceiveProps (which would work for me) not constructor (which obviously does not work for me).

Any guidance here would be appreciated.