React 1
React 1
IRFAN JAVED
M HUZAIFA ALI
TABLE OF CONTENTS
01 03
Introduction What is JSX?
02 04
Installation What are Components and
Props?
01
INTRO TO REACT
INTRODUCTION
React JS is an open-source JavaScript library for
building rich user interfaces. React JS enables
developers to create interactive web applications
that are more responsive and performant than
traditional web development approaches. It uses
a component-based architecture, where each
component can be reused in multiple places
throughout the application, making it easier to
maintain code consistency
02
INSTALLATION
THINGS YOU NEED
NODE AND
NPM VS CODE
You can download You can download
the latest the latest
a version of Node.js a version of Visual
from the official Studio Code from the
website official website
(https://nodejs.org/)
and install it using
the instructions
provided.
SETUP REACT DEVELOPMENT
SERVER
STEP 1 (ONLY ONCE):
STEP 2:
REACT FILE STRUCTURE:
03
WHAT IS JSX?
JSX (JAVASCRIPT XML)
JSX is an extension of JavaScript that lets developers write HTML-like syntax in
their code. This makes it easier to create React components with a clear and simple
structure.
Props, short for properties, are a way to pass data from a parent
component to a child component and serve as inputs for each
element’s behavior. They are similar to function arguments and are
used to pass data from the parent component to the child
component.
COMPONENT USING PROPS
PASSING VALUES AS PROPS
TASK