Does setState re-renders only render() function or whole class is executed once again from scratch?

    class Sample extends Component {
          constructor(props) {
              super(props);
          this.onLoad()
     }
     
     onLoad() {
          //Some Data fetching
     }
    

     render() {
        return <Text>Sample Class</Text>;
     }
  }

if I call setState() at some point in my class is my onLoad() function is going to be called?



from Recent Questions - Stack Overflow https://ift.tt/3jemgDB
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept