You are on page 1of 3

REACT JS

Open source java script framework developed by facebook used to


build interactive web application effectively and quickly with significant
less number of code.

Composable-make custom components,We have small pieces


that we can put together to make something larger/greater than the
individual pieces.

Declarative-Declarative means I can tell the computer WHAT to


do and expect it to handle the details. Imperative means I need to tell it
HOW to do each step.

ReactDOM.render(<h1>hi</h1>,document.getElementById(“root”))

JSX-Javascript xml
(like writing a html in js)
Return object notation

Const navbar = <h1>nav</h1>


Const root = ReactDOM.createRoot(document.getElementById(“root”))
root.render(navbar)

REACT COMPONENT
Pascal case
Function that return react elements,reusable
Combining the html elements into a single component and that can
be reused .eg:<Navbar />

Vite
Frontend modern tool provide extreme faster development of the
environment and bundle up the code

NODE JS
Create real time applications,
Provide server side runtime environment for javascript
run in JSengine(add additional power to your js code)

JS INSIDE JSX=> if u want to use js inside jsx use with the help of {}
{ js variable}

PROPS
Properties being passed to a component inorder to work correctly similar like function
receiving the parameter
Create reusable custom components(<MyAwesomeHeader title="???" />)
Datatype object
Receive props(function Navbar(props))

Destructuring props=(function Navbar({img,num,email}))eg

Passing in non-string props


number={12}
name=”sownd”

Array.map()
Create a new array from calling a function for every element

indexOf()
Return the index of occurrence of the first element
Eg:const a=[5,2,3,2,1,1]
a.indexOf(2)//1 is the index of 2
filter()
Return a new array that satisfy the condition
syntax:array.filter(callback function(element))
callback function()=to run every element in the array
Element = required parameter represent the element in the array

Eg
Let age=[23,43,17,2,1]
Function age(age){
return age>18
}
Let res=age.filter(age)
console.log(res)
//[23,43]

npm i uuid=>uuid(universal unique identifier)generate unique ids

You might also like