#HelloFrontend #HelloErmine #HelloWorld2021
Last updated 3 years ago
Was this helpful?
State เป็นเหมือนค่าสถานะต่าง ๆ ภายในแต่ละ component ที่สามารถเปลี่ยนแปลงได้ และส่งไปเป็น prop ให้กับ component ลูกได้
React จะทำการ component เมื่อ state มีการเปลี่ยนแปลง (ถ้ามีการส่ง state ลงไปเป็น prop ให้ component ลูก จะทำให้ component ลูกถูก re-render ไปด้วย)