What are the types of data that control a component?

Technology CommunityCategory: React NativeWhat are the types of data that control a component?
VietMX Staff asked 3 years ago
  • There are two types of data that control a component: props and state.
  • props are set by the parent and they are fixed throughout the lifetime of a component. For data that is going to change, we have to use state.