When we call setstate({})
after it, it has to call function My requirements. I want to add or remove classes on specific state so I want to check state in runtime and call a function on a specific state.
Thanks.
you should be able to do this :
this.setState({ state }, () => {
//do stuff
});