0% found this document useful (0 votes)
56 views

React Js

React Router is used to define multiple routes in a single page application and enable navigation without page refreshes. State is like a variable that can store any data in a component and causes re-rendering when updated, unlike a normal variable. Props are used to share data between components, especially from parent to child components. Life cycle methods are predefined methods that monitor component updates. Hooks allow using state and lifecycle methods in function components.

Uploaded by

shivam modanwal
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

React Js

React Router is used to define multiple routes in a single page application and enable navigation without page refreshes. State is like a variable that can store any data in a component and causes re-rendering when updated, unlike a normal variable. Props are used to share data between components, especially from parent to child components. Life cycle methods are predefined methods that monitor component updates. Hooks allow using state and lifecycle methods in function components.

Uploaded by

shivam modanwal
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

* what is router in react ?

=> ReactJS Router is mainly used for developing Single Page Web Applications.
React Router is used to define multiple routes in the application.
It enables the creation of single-page web or mobile apps that allow navigating
without refreshing the page.

* what is difference between framework and library ?


framework defines how a developer designs an application and a library
consists of functions that an application can call to perform a task.
what is state

* it's like a variable we can store any data or (information ) in it ex


name,object,arry etc
#then why we can't take variable to sotre value ?
& when we update state component will rerender again but not in case of
variable
that's why we don't take variable.
*we use state only in the component not outside of componenet.

what is props ?
*props use hota hai jab do ya do se adhik component me data shair karna hota hai
tab
ek component ke under hi data rakhna hai tab hum state use karte hai jab ek
component
se bahar data lekar jana hota hai to hum props use karte hai
* we can send data parent to child, child to parent and in sibling component

what is life cylce method ?


* kuchh method hote hai jab hamare component me kuch operation perform hote hai tb
vo follow
hote hai jaise ki humare component load hota hai ya update hota hai tb vo follow
hote hai

what is hooks ?
*function componenet ke under hum state aur life cylce method use nhi kar sakte
unko use karne
ke liye hume hooks use karne padte hai
*we can use hooks in function component not in class component
* where you find any key which start with use like useEffect then that will be
hook

what are the useState ?


*this is a hook for use state in functional component agr koi bhi hook hoga to uske
starting
me use hoga ex- usestate ;

what is NPM?
* this is Node Package manager which which help to install library in ReactJs
ex like = map etc;

what is package.json ?
ye application ki details carry karti hia jaise ki version

what is SPA ?
*it stands for single page Application
*which means application look like single page and no reoload or refresh on jumping
on other page
and link
* we can make single page application react,angular and vue

#we use state and props instead of let ,var and const in component because
jb hum state ya props ki vlaue change karte hai to pura component re-rendor hoga
but agr hum
let,var ya const use karenge to re-rendor nhi hoga component

what is pure componenet ?


*pure component in react are the components which do not re-rendoers when the value
of state
and props has been updated withe the same value

*NOde js*

Node js is single threaded or multithreaded?


*Node js single threaded hai mtlb ek bar me ek hi instructoin execute kiya ja sakta
hai
multithreaded ka mtlb ek bar me kai saare instruction execute kiye ja sakte hai

*node js ek run time environment hai java script ka ye java script ko allow karta
hai
server side exuction ke liye `````

*node js me jave script ko run karne ke liye v8 engine use karte hai ye vhi browser
hai jo
browser me use hota hai

What is REPL in Node js ?


Read evaluate print and loop jb bhi hum node js ko command line pe use karte hai to
sabse pahle
input read hote hai uske baad evaluate hote hai uske baad print hote hai our ye
loop chalta
rahetea hai jb tk hum command line se exit nhi karenge tb tk har ek value ko vo
REPL karega

what is life cylce method ?


life cylce method does not depend upont project it depend upon component if we
have 10
componet then we can have 10 life cylce method
* life cylcle method is predefined method who monitor our component and update
component
* we have 3 phases in life cylce method 1. mounting 2. updating 3.unmounting

What is the DOM?


*The DOM (Document Object Model) represents the web page as a tree structure.
Any piece of HTML that we write is added as a node, to this tree. With JavaScript,
we can access any of these nodes (HTML elements) and update their styles,
attributes, and so on.

what is library ?
*Libraries in programming languages are collections of prewritten code that users
can use to optimize a task.

What is Socket.IO is used for?


Socket.IO is a library that enables low-latency, bidirectional and event-based
communication between a client and a server

*webrtc and socket io is combination of powerfull technology where you will able to
transfer data in real time with low latency.
And thats why its been considering the best technology to build video conferencing
app.

What is RTC in Google?

WebRTC is an open source project to enable realtime communication of audio, video


and data in Web and native apps.
*WebSocket provides a client-server computer communication protocol,
whereas WebRTC offers a peer-to-peer protocol and communication capabilities for
browsers and mobile apps.

what is peer js ?
*PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls.PeerJS is a
WebRTC framework
*PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls.

what is framework ?
A framework in programming is a tool that provides ready-made components or
solutions
that are customized in order to speed up development. A ..

What is JSX used for?


*JSX allows us to write HTML elements in JavaScript
*JSX converts HTML tags into react elements.
*You are not required to use JSX, but JSX makes it easier to write React
applications.

what is babel ?
*Babel is a very famous transpiler that basically allows us to use future
JavaScript in today's browsers.
In simple words, it can convert the latest version of JavaScript code into the one
that the browser understands

*react component is custom html element also we can define attribute in react;
in react cutom element is called component and cutom attribute called property or
props;

*state= user interface depend upon state it will change if state are change it like
ica and water these are same thing but it depend
upon change of state(temperature) if temperture increase ice convert in water and
if temperature decrease then water convert in
ice in react state are same like temperature UserInterface= function( state) ;

*why we use ract ?


Easy creation of dynamic applications: React makes it easier to create dynamic web
applications because it requires less coding and
offers more functionality,
as opposed to JavaScript, where coding often gets complex very quickly.Improved
performance: React uses Virtual DOM,
thereby creating web applications faster

*what is difference between functional and class components ?


The class component uses ES6 class syntax, and it extends React components with a
render method that returns React elements.
On the other hand, functional components with hooks are purely JavaScript
functions that also return React elements.
Before the introduction of hooks, functional components were stateless.
project********
what is webRTC ?
=> webRTC stand for web real time communication
=> in webRTC there are no sever involved to share real time data from clinet to
another
=> webRTC connection are peer to peer
=> all of done through webRTC API which available on all the plateform

*when i said that there is no server required for webRCT to work i


was not completely right about it there are server required intially for the client
computers
to get connected but once the connections established then this client can
communicate with
each other without the need of having a server in the middle the transefer of data
is peer to
peer once they are connected

*WebRTC connects users by transferring real-time audio, video and data from device
to device using P2P communications.
*The goal of WebRTC is to facilitate real-time P2P communications over the internet

You might also like