Hello, I don't know if this is the normal behavior, but every time shouldWorkAgain is called, the constructor of the component is invoked, thus is construct the component again every time. This happens after I upgraded to React 16, with React 15 I don't have this behavior.
Here is my code :
@inject('userStore')
@withRouter
@observer
@withJob({
work: ({ userStore, match }) => {
return userStore.fetchUserListings(match.params.params);
},
shouldWorkAgain: (prev, next) => {
return (prev.match.params.params !== next.match.params.params);
},
LoadingComponent,
ErrorComponent,
serverMode: 'defer',
})
export default class UpListingsView extends Component {
//....
}
Hello, I don't know if this is the normal behavior, but every time shouldWorkAgain is called, the constructor of the component is invoked, thus is construct the component again every time. This happens after I upgraded to React 16, with React 15 I don't have this behavior.
Here is my code :