Created by Zainab Durrani
about 1 year ago
|
||
REACT - Open-Source JS Library
Build for UI and front-end webpage components.
REACT - Component-based(i.e. everything/every application is component-based!)
REACT COMPONENT: Reusable pieces/independent code used to make the application's UI.
Each Component has 2 things:
i)State Object: contains component's data that changes over time.
ii)Props Object: data that can be passed from parent to child components.
A component can be as small as a button, or as large as an entire page.
React components are JavaScript functions that return markup.
React component names must always start with a capital letter, while HTML tags must be lowercase.