React.js Notes

1. Concatenate      2 var data  + in one var (2 var ke data ko jodta hai  js mai);

2.What are the Components? what are you doing

Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and return HTML via a render() function. Components come in two types, Class components and Function components

Image result for types of components react js
3.Types of React Components 
  • Functional Components.
  • Class Components.
  • Pure Components.
  • Higher-Order Components.

  • 4.jquery wich always using  id is # for example(#abc)
5. 3 type of HTML data output in js 1)HTML .2)text .3)append mens repet input field or data

6. onkeypress function in js is function mai agr input field mai koi v data type krenge to output mai koi changes ni hoga 

7...3 type of function create in js
i)  function get_onkeypress(e){
  document.getElementById('onkeypress').value=e;
  }  (normal function);
ii)var demo=function(asd){
console.log('gvshdsgvg',asd);
};( variable ke sath declare function)

iii)var demo2= (asd) => {
 alert('fffff '+asd);
};( object ke stah function)

8...koi v function ko check karne ke lie hum console mai windeow mai check krenge
9..setTimeout function isme function mai aagr data mai koi time set kia hai to usko stop me lie use hota hai for emaple=====>

 setTimeout(function(){ 
  var d = new Date();
  var timetemp = d.getTime();
  
 demo2('ccccccc'+ timetemp);
 
 }, 3000);

10.onkeydown function is function mai agr input field mai koi v key press kroge to jo data apne HTML mai set kia hoga vahi aaega for example 
<input id="onkeydown" onkeypress="get_onkeydown('45354353566646666');" >
  function get_onkeydown(e){
  document.getElementById('onkeydown').value=e;
  }
var demo=function(asd){
console.log('gvshdsgvg',asd);
};


11.Onkeyup is function mai agr input field mai koi v keypress kroge to jo data apne HTML mai set Kia Hoga vahi aaega or 1word jo v press kroge Wo Bhi add ho jaega empale onkeypess ki trh same bs function onkeyup use hoga

12.. 3 types of variables in us and react is...
i)Var=Private Variable.
ii)Let=Public Variable.
iii)Const=Static Variable.

13..Props props data mai prvs page ka next page ya Kissi v page mai get kar skte hai props ek type ka attribute ye id ki trh kam krta hai

14...Form mai update ya data change ke lie     handleChangephone(event) {
      this.setState({phone: event.target.value});
    } use hota hai isme sbse pele function lete hai uske
condition mai
event ya (e) lete hai tmlb ki click mai
kya perform krana hai or uske bad jo state set ki hai use
cll krte hai
ki kya data chnge krana hai click pe or
target ki kha krana hai or .value ki kya
Krona hai### hmesha HTML YA XML my data get me to lie onChange attribute
use krte hai......

15..bind
class component mai function declare ya data pass k lie use
Hota hai...
16....render state ka deta hamesha render se get karte hai

17...java script mai same page ko reload Krane ke lie  
 window.location=window.location.href; use hota hai..

18.. JSstringify.=> json data ko string mai convert krta hai


19...Jquery and Javascript mia id hmesha # se or class hmesha . se strt hoti hai

20..click to submit in claas thrue with jquery==>
$(document).on('click',".memberservicebt",function(e){
    e.preventDefault();        
        $(this).submit();
        
 });
21..Hookes => Hokkes hume ek feather provid krta hai jisme hum funcation componants mai
state set kr skte hai kyuki pehle state sirf class componants mai set hoti thi.....

22,Componants =>spacific part of code hota hai jise hum re use kr sakte hai...

23.... REDUX =>redux use in state manegment react mai hum data perent se child ko bhej
sakte hai child se perent ko nahi redux mai hum all state ko set krte hai jis v state
ka data chie use cll krte hai....


24...Action => action is a plan java script object...

25...source mai 2 folder banenge redux ke action or reduex...

26...store ki file humesha src mai create hogi...

27...hokkes only function componants mai use hota hai...

28...what is the functionscop ==> function scop wah hota hota hai jie hum
function mai declear krte hai or ise hum khi v excess kar skte hai var
function scop hai..
29..what is the block scop ==> block scop wah hota hai jise hume function ke under hi declear krke data get kr skte hai let and const block scop hai
example===>
//function scop start
function abc(aaaaa){
//block scop start
if(aa){
let abc=10;
let vvvv=12'
console log(block scop)
}
//block scop closed
console.log(function scop)
//function scop closed


.....
ECMA 5 AND ECMA6 DIFFRENCE ECMS 5 normal java script hai or ECMA 6 advanced javascript hai for exmaple //concedinate ecma5 console.log("robin" + "25".); //concedinate ecma6 console.log(`robin.25.`); //`` is tab se upar wala erro //mtlb ecma mai hum + us krte hai//concedinate ke lie or concedinate ecma6 mai hum . use krte hai


Comments

Popular posts from this blog

condition in table data for html

my notepad code notes