Introduction to React js
Aya Benkabbour
@ayaintheclouds
Course Expectations
+
small project
this course was made for …
Why use React ???
https://www.netflix.com/ma-fr/browse/genre/83
Why use React ???
https://www.airbnb.fr/
Copy and paste …
⇒ Something must be wrong
🚨
This is where React come into play !
Component-Based Architecture
Virtual DOM
React Native
Performance
Compatibility
One-Way Data Flow
Declarative vs Imperative
React.js is declarative because it allows you to describe what you
want the UI to look like based on the current data or state, and it
handles the underlying operations to achieve that. Vanilla
JavaScript, on the other hand, is often considered imperative
because it requires you to specify each step explicitly to achieve
the desired outcome. The declarative nature of React can make it
easier to reason about and maintain complex user interfaces.
Declarative vs Imperative
Let’s get our hands dirty !
Browser
local development
using node js (you should install
it , preferably the long time
support version)
simply type “ react.new “ in the
search bar to get a sandbox
in the command line , type the following commands :
npx create-react-app my_application
cd my_application
npm start
you have two options

React Session 1.pptx

  • 1.
    Introduction to Reactjs Aya Benkabbour @ayaintheclouds
  • 2.
  • 3.
    Why use React??? https://www.netflix.com/ma-fr/browse/genre/83
  • 4.
    Why use React??? https://www.airbnb.fr/
  • 5.
    Copy and paste… ⇒ Something must be wrong 🚨
  • 6.
    This is whereReact come into play ! Component-Based Architecture Virtual DOM React Native Performance Compatibility One-Way Data Flow
  • 7.
    Declarative vs Imperative React.jsis declarative because it allows you to describe what you want the UI to look like based on the current data or state, and it handles the underlying operations to achieve that. Vanilla JavaScript, on the other hand, is often considered imperative because it requires you to specify each step explicitly to achieve the desired outcome. The declarative nature of React can make it easier to reason about and maintain complex user interfaces.
  • 8.
  • 9.
    Let’s get ourhands dirty ! Browser local development using node js (you should install it , preferably the long time support version) simply type “ react.new “ in the search bar to get a sandbox in the command line , type the following commands : npx create-react-app my_application cd my_application npm start you have two options