React -1 ( react with ravenndra kanchi)

 react with tool chanis


45 to 50 sessions core 

after 50 sessions -> some tooll chains


==
react with type script

mern stackaplication

in this course it has 17 and 18

additional libraries and tool chanins

=
we will discuss everytopic of react

routing, hooks, api calls
and advncaced topics

==

what i sreact and why we need react

=

what are the challenges in modern web development

==
react becomes more popular from 214

before that there is no internet
there is no website

netflix is designed with react

amazon is designed with react


=
why react is trending from 2014

=

from 1999 we have browser

we hve web applicaitons 

why suddenly trending from 2014

modern web userrs are  using we from smart devices



80 percent users from mobile only right from smart devices only like tab 

earlier u hve to vicist a net cafe , u need to pay hourly 10 rupes

becuase this less traffic earlier 

we need unified user experience 

for example we have youtube

watchignthis on pc  or tab

diferetn devices diferent dimensions 

we have to optiomise size to fit on mobile ( compress previosuly) 

m.facebook.com, diferent devices diffent domains

when application is optimisd, mobile users unable to certain facility 

u have ms office in ur lappy and in mobile 

mobile in ms ffice -> severla options is not avaialble

when watching from mboile -> restrictting some acces

that is not good


-> 
now mobile has same experince like all devices

unified expericne -> in all devices all options avaialble

===

unified ux


====

fluid user expericnce

==
iam  using google 

imaging this on mobile 
some list came after browsing 

in that pagination -> iam scrolling down to reach so amny pages

if this watch on mobile -> it is very small, how to click on that small siz e

-> 
zoom and click 

-> that ui developed font and sizes based on the mobile 
every one can see 

not zoom and click 

=> in images, auto images loading 

==>
to developing like this it is more difficult

==>

these are challenges

===>


loosely coupled and extensible


=> 

one new feature is created, 
sepertely developed after all tetings
it 



new feature developed , to integrate it into production app
customer will have to reinstall the application 
its not good 

automaticlly comes 

catastropic falures -> it cannot integrate that new feature 

aftre installing software -> in os, os gets technical issues
that should not happen

====
without stopping the application -> new features have to integrate -> loosely coupled and extensible architecture

===

what is a solution for ths 

as a developer what is the solutiin 

- better to build spa -> single page applicaitons 




what is isngle page applications have unified expericne 
spa has fluid experence
spa has loosley coupled and extensible 


difference between ordinar y and spa 


index page

=> login. register

=> click on login -> redirect to some other page 

login -> spa-> it is designe as componentin a page , 
its not another page in spa

===
component level develop is goo d

=





node set up

 ==

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




what wer the usestate functions

 =


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




How does react project starts

 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


every react project is meant to develop html 



server request , in response it load html page and taht will be showin in ui



if need links or some other omponnetn 
that hetml page tells fetch from server 

so the browser send a second request to server 

and give thebundle file to browser

public /index.html


src/index.js 


index.html id ==root

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





what react doing

 react displays html


changes taht html when the user does something


wrtite html in js is called jsx



=
iam showing jsx on the reight side of the screen



function taht return jsxd ( html inside js ) callead as react component

functioin hat return signle project can have so many diferent components inside of it



app.js is front face
it calls one component it calls one compoennt it calls another compoinent finaly it results it forwards to parent and it forwards to parent 


each individual component is in charge of displaying content for a certain portion of application


=


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 






differnece between plaiun htm and componetn is 

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


Recipe.js

</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







react -1

https://www.udemy.com/course/react-redux/learn/lecture/12531044#overview\


@ste_grider


ste.grider@gmail.com


https://discord.gg/h2G3CbxPZA


https://www.drawio.com/



https://www.diffchecker.com/

Inside my terminal, I run the shell https://github.com/robbyrussell/oh-my-zsh with the default theme 'Robby Russell'

write code , work on projects

===

entire language translation app in this tutorails
==

very small react application transaltion app

==

 



===
user enters keyword
select languagte
it will convert to output

https://codesandbox.io/s/react-pibc94

completed code
https://codesandbox.io/p/sandbox/react-forked-m5bz37


===

if u change the code immeediately i twill reflect in  browser 

local 


=


impport 
create variable susing starte
in return 
write html


server laravel application

 asset_url = domain/public


chmod -R 755 public/admin/

composer dump-autoload

get the application from hostinger

Image upload in laravel

 =

if($images !== null) {
$images_array=[];
foreach ($images as $image) {
$data=ImageUpload::instance()->uploadImage($image,'aboutpage');
array_push($images_array,$data);
}
$input['image']=json_encode($images_array);
}
if($b_images !== null) {
$input['banner_two_image']=ImageUpload::instance()->uploadImage($b_images,'aboutpage');
}
$images = $request->file('image');
<?php
namespace App\Helpers;
use Illuminate\Support\Facades\Storage;

class ImageUpload
{

public function uploadImage($requested_image,$location)
{
$storage_dir = 'images/'.$location;
$storage_path = Storage::disk('public')->path($storage_dir);
$filename = time() . '_banner_' . str_replace(' ', '-', strtolower($requested_image->getClientOriginalName()));
$requested_image->move($storage_path, $filename);
$storage_path = 'storage/' . $storage_dir . '/' . $filename;
return $storage_path;
}

public static function instance()
{
return new ImageUpload();
}
}

<div class="form-group"><strong>image:</strong>{!! Form::file('image[]', array('multiple'=>true,'accept'=>'image/png, image/gif, image/jpeg','value'=>'{{$data->image}}','placeholder' => 'image','class' => 'form-control')) !!}</div>
@foreach (json_decode($data->image) as $image)

<img style="width:100px;height:100px;" src="{{asset($image)}}" alt="11.jpg">

@endforeach

<div class="form-group"><strong>banner_image:</strong>{!! Form::file('banner_image', array('value'=>'{{$data->banner_image}}', 'accept'=>'image/png, image/gif, image/jpeg','placeholder' => 'banner_two_image','class' => 'form-control')) !!}</div>
<img style="width:100px;height:100px;" src="{{asset($data->banner_image)}}" alt="11.jpg">

=

Event listening in react

 How we can listen to som eevents

some envents fire like click or automatically

user enters into input button , that is event
on word type it is event




responseive

reactive

interactive 

flexible




React add new template part 2

 =

=

must have one parent ellement


     <div>
            <h1>First Component</h1>
            <p>This is the first component</p>
        </div>
import React, { useState } from 'react';
function First(){
   
    return (        
        <div>
            <h1>First Component</h1>
            <p>This is the first component</p>
        </div>
    )
}

export default First;

=

adding styles in jsx 

import './subscription.css';

div className=''



=


=============

dynamic data in jsx react



variables {} 

curly braces

{javascript code valid}


javascript expressions

=


Data passing in react

=

communication between components



pass as prop


let subscription {

{},

{}

}



Accesing props in react




implemetning js code in jsx react



convert date to readable format


creating single responsibilty components in react


component in component

because for date more transformations 


=


=

children props in react


same kind of template in so many places


=


==

other details in jsx react

writing react in  soo many ways




folder staructure

arrow function 



=




React -1 ( react with ravenndra kanchi)

 react with tool chanis 45 to 50 sessions core  after 50 sessions -> some tooll chains == react with type script mern stackaplication in ...