Contoh :

 

  Contoh kode :

 

 
Gunakan Lifecyle untuk update state