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

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations