react with tool chanis
45 to 50 sessions core
react with tool chanis
==
codesand box is not used for porfessional projects
==
install node js
create a new project
build a project
===
node -v
16.13.0 or some other version
=
state is like a variabvle in react
it is used to store data that changes over time
whenever state changes, react automatically update content on the screen
===
in the translate
three steps
one step take input from user
process that input
shown result
how the translation happens
using google translate api
this translation will ping google api once response got i twill return that respons e
in react project
all projects bundled into a single file and then placed into server
npm run build
app.js, index.js, filed.js translate.js ==> bundle.js
also called as app.bunlde its called some identifier.js
server request , in response it load html page and taht will be showin in ui
so the browser send a second request to server
and give thebundle file to browser
public /index.html
src/index.js
in index.js id == root
which ide is related that id onl y it wille xecutes
index.js
i tis the first file executed in react
===
bundle.js
====
when index.html started loaded on the browser
inside the bundele it has index,hs
index.html root had indcated in bundle,js root
bundle.js telling it has root id , we have to access root id in index.html
react displays html
changes taht html when the user does something
wrtite html in js is called jsx
functioin hat return signle project can have so many diferent components inside of it
we can wrtite in two ways
write react to create a normal html element
write react to show another component
=
write another componetn in app component
===
process the cod eand showi in html
first call app.js and then its call remmaining compoinents which sahared with app. js
staep by step calling
call div
then h1 then call contactlist app
questions
so whats react all about ?
react can develop interactive websites, what it will do is
it can take user actions based otn that process html
each indivudal component is used to create a protion of the applicaiton
plain html starts with small letters
components starts with capital case
======
question
Imagine you are working on a project with two React components. Here is the code for each:
App.js
- function App() {
- return (
- <div>
- <h1>Cake Recipe</h1>
- <Recipe />
- </div>
- );
- }
Recipe.js
- function Recipe() {
- return (
- <ul>
- <li>100g Sugar</li>
- <li>200g Flour</li>
- <li>500ml Water</li>
- </ul>
- )
- }
- <div>
- <h1>Cake Recipe</h1>
- <ul>
- <li>100g Sugar</li>
- <li>200g Flour</li>
- <li>500ml Water</li>
- </ul>
</div>
If React tried to show the App component (the code in the App.js file), what would the final HTML displayed on the screen probably look like?
=====
how does a react app start up
npm run build
it getnerates html file and bundled js
if user
==
what were the usestate functions
how did the text get translated to another language
https://www.udemy.com/course/react-redux/learn/lecture/12531044#overview\
@ste_grider
ste.grider@gmail.com
https://www.drawio.com/
automatically by https://prettier.io/
asset_url = domain/public
chmod -R 755 public/admin/
composer dump-autoload
get the application from hostinger
=
=
How we can listen to som eevents
some envents fire like click or automatically
reactive
interactive
flexible
=
=must have one parent ellement
=
adding styles in jsx
import './subscription.css';
div className=''
dynamic data in jsx react
curly braces
{javascript code valid}
=
Data passing in react
=
communication between components
pass as prop
{},
{}
}
Accesing props in react
convert date to readable format
because for date more transformations
children props in react
react with tool chanis 45 to 50 sessions core after 50 sessions -> some tooll chains == react with type script mern stackaplication in ...