Presented By: Ahmad Hamza
Follow me: @ahmad19 / @ahmad_719
Library for creating user interfaces by Facebook and Instagram
Think React as V in MVC
Simple
Simply express how your application should look at any given point in time, and React will automatically manage all UI updates when your underlying data changes.
Declarative
When the data changes, React conceptually hits the "refresh" button, and knows to only update the changed parts.
Build Composable Components
React is all about building reusable components. In fact, with React the only thing you do is build components. Since they're so encapsulated, components make code reuse, testing, and separation of concerns easy.
Start with a mock
1. Break the UI into a component hierarchy
2. Build the static version in React
3. Identify the minimal (but complete) representation of UI state
4. Identify where your state should live
5. Add inverse data flow
Text
Five components here:
UI into Component heirarchy
Lets arrange the components in the hierarchy
Components that appear within another component in the mock should be treated as a child in the hierarchy
Components
JSX
Virtual DOM
Some methods
State
Props
Component Lifecycle
Components are the basic building blocks
Think of a component as a collection of HTML, CSS, JS and some internal data specific to that component
Components are either defined in pure JS or in JSX
Components helps in building UI efficiently
Components are just like functions
You can think of them as simple functions that take inprops and state (discussed later) and render HTML
JSX: Allows us to write HTML like syntax which gets transformed to lightweight JavaScript objects
Think of a component as a collection of HTML, CSS, JS and some internal data specific to that component
Components are either defined in pure JS or in JSX
Components helps in building UI efficiently
Components are just like functions
You can think of them as simple functions that take inprops and state (discussed later) and render HTML
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nec metus justo. Aliquam erat volutpat.