Why does React asynchronously request data report errors while Vue does not have similar errors?

this kind of error occurs occasionally in ajax under componentDidMount with react

Warning: setState (.): Can only update a mounted or mounting component. This usually means you called setState () on an unmounted component. This is a no-op. Please check the code for the Timer component.

probably removes the react component from DOM, and then calls setState to change the state of the component
but it seems that vue does not have a similar error
because of the different rendering mechanism?
Please give me your advice. Thank you

Mar.22,2021

this is a warning, not a mistake. It doesn't matter much if you don't care about him.
if you have obsessive-compulsive disorder, you can add the following code to solve

componentWillUnmount(){
    this.setState=()=>{};
}
The

hint clearly says: your setState is in the wrong place.

Menu