ကျတော်တို့က component lifecycle ကိုလေ့လာတဲ့အခါမှာ lifecycle stage က သုံးဆင့်ရှိပါတယ်
အဲဒါက ဘာတွေလည်းဆိုတော့ mounting stage ရယ် updating stage ရယ် unmounting stage
mounting stage
updating stage
unmounting stage
တွေပါ ပဲ အဲဒါတွေအပေါ်မူတည်ပီးတော့ method က သုံးမျိုးရှိလာပါတယ်
( အရင်ကတော့ အများကြီးရှိပါတယ် ပိုအသုံးများတဲ့အရာကိုပဲ ဦးစားပေးပြီးတော့ ရှင်းပြသွားမှာပါ )
အဲဒါတွေက ဘာတွေလည်းဆိုတော့
componentDidMount()
componentDidUpdate()
componentWillUnmount()
တွေပါပဲ ဗျ ကျတော်တို့ method name ကို ကြည့်လိုက်တာနဲ့ကို ဘယ်ဟာက ဘာအတွက်လည်းဆိုတာကို
ချက်ချင်း မြင်သာပါတယ်ဗျ
Last updated 2 years ago