kranthi
kranthi
Mar 26, 2019 · 1 min read

constructor is where we initialize the state because constructor gets invoked only once in the component lifecycle, if it’s initialized it inside render, every time it gets reinitialized which could lead potential and also by doing const {state} = this.state; you mentioned it will avoid gaps with this.setState({}), could you please elaborate on this.

    kranthi

    Written by

    kranthi

    CODING/MUFC/MUSIC