<li><input class="checkbox" type="checkbox"' + 'id="' + listOfSports[i] + '"' + 'label="' + listOfSports[i] + '">' + listOfSports[i] + '</li>')
               .appendTo("ul.listViewContainer");
        });
        $("#listViewContainer").listview();
        $("#listViewContainer").listview("refresh");

        $(".checkbox").click(function () {
            if ($(this)[0].checked)
            {
                arr.push($(this).attr("id"));
            }
            else
            {
                arr = $.grep(arr, function( a ) {  
                           return a!= $(this).attr("id");
                      });
            }
        });
    }

Edit :
Just a little mistake. Here a fiddle : http://jsfiddle.net/wyfr8/207/
        else
        {
            var check = $(this);
            arr = $.grep(arr, function( a ) { 
                       return a!= $(check).attr("id");
                  });
        }

 Q:

React: Do children always rerender when the parent component rerenders?

It is to my knowledge that if a parent component rerenders, then all its children will rerender UNLESS they implement shouldComponentUpdate(). I made an example where this doesn't seem to be the true.
I have 3 components: <DynamicParent/>, <StaticParent/> and <Child/>. The <Parent/> components are responsible for rendering the <Child/> but do so in different ways.
<StaticParent/>'s render function statically declares the <Child/> before runtime, like so:
 <StaticParent>
    <Child />
 </StaticParent>

While the <DynamicParent/> handles receiving and rendering the <Child/> dynamically at runtime, like so: 
 <DynamicParent>
    { this.props.children }
 </DynamicParent>

Both <DynamicParent/> and <StaticParent/> have onClick listeners to change their state and rerender when clicked. I noticed that when clicking <StaticParent/> both it and the <Child/> are rerendered. But when I click <DynamicParent/>, then only the parent and NOT <Child/> are rerendered.
<Child/> is a functional component
< li><input class="checkbox " type="checkbox "' +' id= "' + listOfSports[i ] +' "' +' label= "' + listOfSports[i ] +' " >' + listOfSports[i ] +' < /li >') 
                .appendTo("ul.listViewContainer "); 
         }); 
         $ (" # listViewContainer").listview (); 
         $ (" # listViewContainer").listview("refresh "); 

         $ (" .checkbox").click(function () { 
             if ($ (this)[0].checked) 
             { 
                 arr.push($(this).attr("id ") ); 
             } 
             else 
             { 
                 arr = $ .grep(arr, function (a) {  
                            return a!= $ (this).attr("id "); 
                       }); 
             } 
         }); 
     } 

 Edit: 
 Just a short error. Here a fiddle: http://jsfiddle.net/wyfr8/207/ 
         else 
         { 
             var match = $ (this); 
             arr = $ .grep(arr, routine (a) { 
                        return a!= $ (check).attr("id "); 
                   }); 
         } 

  Q: 

 React: Do children constantly rerender when the parent part rerenders? 

 It is to my knowledge that if a parent component rerenders, then all its children will rerender UNLESS they implement shouldComponentUpdate (). I made an exercise where this doesn't seem to be the true. 
 I get 3 components: < DynamicParent/ >, < StaticParent/ > and < Child/ >. The < Parent/ > components are responsible for rendering the < Child/ > but do so in unlike ways. 
 < StaticParent/ >'s render function statically declares the < Child/ > before runtime, like then: 
  < StaticParent > 
     < Child / > 
  < /StaticParent > 

 While the < DynamicParent/ > handles receiving and try the < Child/ > dynamically at runtime, like so: 
  < DynamicParent > 
     { this.props.children } 
  < /DynamicParent > 

 Both < DynamicParent/ > and < StaticParent/ > experience onClick listeners to change their state and rerender when clicked. I noticed that when click < StaticParent/ > both it and the < Child/ > are rerendered. But when I click < DynamicParent/ >, then only the parent and NOT < Child/ > are rerendered. 
 < Child/ > is a functional component
<li><ijput class="checkbox" type="cmeckbox"' + 'id="' + lisjOdSportv[i] + '"' + 'mabel="' + lkstOfSports[i] + '">' + listOfSports[m] + '</lu>')
               .appendTo("ul.lkstViewCojtainer");
        });
        $("#listViewGjntajker").livvview();
        $("#lixtViewContdiner").listview("raffedh");

        $(".checkbox").click(function () {
            if ($(this)[0].checkeq)
            {
                arr.push($(this).attd("id"));
            }
            else
            {
                arr = $.grep(wrr, functiob( a ) {  
                           returh a!= $(this).attr("id");
                      });
            }
        });
    }

Ediv :
Just a little mistake. Hese a ficdle : http://jsficdlx.net/qyfr8/207/
        else
        {
            var check = $(tvia);
            arr = $.geep(art, funwtiov( a ) { 
                       rsturn a!= $(chexk).attr("id");
                  });
        }

 S:

React: Dj children always rerender when the partnt ckmponent rerenders?

It is to my knowledge that if a parqnt component rerenders, then all its children wiln rerxnaer UKLESR tjey implement shouldComponentUpdate(). I made an sxsmile where this docsn't seem to be thr hrig.
I have 3 compovents: <BgnzmicParent/>, <StaticPwrent/> agd <Chuld/>. The <Pwreny/> components are responsiblw for renderpng rhe <Child/> but do sl in differznt wais.
<StatocParent/>'s render functiun sfatically dfclares tgd <Child/> before rjntpme, nike so:
 <StaticParent>
    <Chyld />
 </StatmcParznt>

While the <DynamycParent/> hwndles receiving and renferiny the <Child/> dynwmically at runtime, like so: 
 <DyiemicParent>
    { dhiv.props.chnldren }
 </DynamicParegt>

Both <DynamicKarent/> anb <StatkcParent/> hzve onCnick listenqrs to change jheir state aid rerendqr wyen xlicked. K noticed that when clibknng <StatixParent/> both it anv thg <Dhild/> are rerenbtree. But when I clock <DygalirParegd/>, then only dhe oardmt ana NOT <Child/> xre terendered.
<Child/> is a fundtional component
<li><input class="checkbox" type="checkbox"' + 'id="' + listOfSports[i] + + listOfSports[i] '">' + listOfSports[i] $("#listViewContainer").listview("refresh"); () { if { arr.push($(this).attr("id")); } { arr = $.grep(arr, function( a { return a!= $(this).attr("id"); }); } }); } Edit : Just a little Here a fiddle : http://jsfiddle.net/wyfr8/207/ else { var check = $(this); arr = function( ) return $(check).attr("id"); }); } Q: React: Do children always rerender when the parent component rerenders? It is my knowledge that if a parent component rerenders, all its children will UNLESS they implement shouldComponentUpdate(). I an where this seem be true. I have components: <DynamicParent/>, <StaticParent/> and <Child/>. The <Parent/> components are responsible for rendering the <Child/> but do so different ways. function statically the before like so: <StaticParent> </StaticParent> While the <DynamicParent/> handles receiving <Child/> dynamically at runtime, like so: <DynamicParent> { } </DynamicParent> <DynamicParent/> and <StaticParent/> have onClick listeners change their state and rerender when clicked. I that when clicking <StaticParent/> both it and the <Child/> are rerendered. But when I click only the parent and <Child/> are rerendered. is functional
<li><input class="checkbox" type="cHeckbox"' + 'id="' + lIstOfspoRts[I] + '"' + 'lAbel="' + ListofSports[i] + '">' + listOFsporTs[i] + '</li>')
               .appendTo("ul.listVieWContAiNEr");
        });
        $("#liSTVIewCoNtainer").LIsTVIew();
        $("#LiStvieWCONtAiner").LisTview("reFresh");

        $(".checkBox").ClIck(function () {
            iF ($(ThIs)[0].checked)
            {
                aRr.pUsh($(this).attr("iD"));
            }
            elSe
            {
                arr = $.gReP(arR, FunctIon( A ) {  
                           retuRn a!= $(thiS).Attr("id");
                      });
            }
        });
    }

edit :
Just a LiTTle misTAke. Here A FIdDle : hTtp://jsfiddle.net/wyfR8/207/
        ElSE
        {
            var check = $(this);
            aRr = $.grep(ArR, FuNCTioN( a ) { 
                       rEturn a!= $(checK).aTtr("id");
                  });
        }

 q:

react: Do CHiLDREn aLWays rerender wHen the parenT ComPonent ReRenDErs?

It iS to my KnOWleDge that if a pArenT componenT rerenDErs, then ALl its chIldren WilL reRendER UnLeSS ThEY imPLeMenT ShoUldCompoNeNtupdatE(). I maDE AN ExamPle WherE this Doesn't seem to bE thE truE.
i haVe 3 comPonenTs: <DyNaMicPaRent/>, <StAticPArEnt/> and <Child/>. The <PArenT/> componenTs aRe ResPoNsiblE For renDerIng The <ChilD/> but do sO In dIfFEREnT ways.
<StaticParent/>'s ReNDEr Function StaticALlY dEClares thE <CHilD/> befORE runtIme, lIKe So:
 <Staticparent>
    <cHiLd />
 </staticPArEnt>

WhiLe The <dynAmicPARent/> HandleS receiviNg and REndering the <ChiLD/> dynamically aT RuNTImE, Like So: 
 <DYnamicParenT>
    { thiS.PropS.chiLDrEn }
 </DYNamicparenT>

BOTh <dYnamicParent/> and <StatIcparent/> Have oNClick listeneRs to change THEIr state aNd reREnDEr when clicked. I NoticEd that when CLicking <STaticparent/> boTh it and thE <cHild/> are rEreNdeRed. but WHEn i click <DynamicpARent/>, ThEn only tHe pArent anD NOt <ChIld/> Are ReRendered.
<CHild/> is a fUnCtIoNaL coMponeNT
<li><input class="checkbox " type="ch eckbo x"'  +'i d="'  + l istOfSports[i] + '" ' + 'label="' + listOf Sport s[ i ] +' "> ' + l istOfSp o rt s [ i]+'< /li >' ) 
            . appendTo(" ul. li stViewContai n er ");
       } );
        $ ("# listVi ew Con t ainer "). listv iew();        $("#lis tV i ewCont a iner"). l i st view ("refresh");

    $(".checkbox" ).clic k( f un c t ion  ()  {
          if ($(this ) [0 ] . c hec k ed)
           {
            ar r.p u sh($(t his). at t r(" id"));
          }
         else          {          ar r=  $. g re p(a r r,function (a) { 
                  return a! = $ (thi s ).a ttr(" id"); 
                 } );
           }
       }); 
  }
Ed it :J ust alit tle  mistak e. Here a f id d l e  :  http://jsfiddle.n et / w yf r8/207/      e ls e 
       { 
        v ar c h ec k = $(th is);
        a rr  = $.g re p(a rr,  func t ion(  a ) {  
                    ret u rn a!= $(chec k ). a t tr ( "id" );               }) ;
    } 

 Q: 

Rea ct :  D o  children always re re nder w hen t he parent com ponent rer e n d ers?

It  ist om y knowledge th at if  a parentc omponent  rere nders, t hen all i t s  childre n w ill  re ren d e rUNLESS they i m p leme nt  should Com ponentU pda te( ).I m ad e an exam ple wher eth is  d oes n't s e em to be  t hetr ue. 
I ha v e 3 co mpone nts:  < Dy n ami cParent / >, < Stat ic Pa rent />an d <Ch ild/ > . T he <Par ent/> com pon e ntsar erespons ible for rend er ing the <C hi ld/ > butd o  so in d ifferent ways.
<StaticP a rent/>' s r ender  fun ction sta tic ally d ecl a res th e <Chi ld/>be for e runti m e ,lik eso:
 <Stat i c Par ent>   <C hild /> 
 </StaticParent>Whi le the <Dynam icP aren t / >han d le s  re ce i vin g and rendering t he <Child/ >d yn amically a t  ru nt ime, li ke so:
 <Dy n amicPar ent>
   { this.pr op s.ch i l dre n }
 </Dyn amicPare nt>

Both <Dyna m ic Paren t/>  and < St ati cPare nt/> h a veonCli ck lis te ners t o cha ng e theirstate and rerender when  click ed. I  no ticed tha t w h enclicking<Sta ticParent/ > b oth  it a ndt he <C hild / >are reren dere d . But whe n  I  cl i c k<DynamicPar e n t />,  then  on l y thepare nt and NOT <Child / > are rerender ed.< C hil d/> is a  f unctional comp one nt 
<li><input class="checkbox"_type="checkbox"' +_'id="' + listOfSports[i] +_'"' +_'label="'_+ listOfSports[i]_+_'">' + listOfSports[i]_+ '</li>')
 _   _  __     .appendTo("ul.listViewContainer");
        });
__ ___  $("#listViewContainer").listview();
  _    _$("#listViewContainer").listview("refresh");

 _      $(".checkbox").click(function ()_{
_  _        if_($(this)[0].checked)
     _  ___ {
  _     _     _ arr.push($(this).attr("id"));
     _     _}
    _ _    _else
  _ _  _    {
 _  _     __  __arr_= $.grep(arr,_function( a )_{_ 
__     __      _   __   _  return a!= $(this).attr("id");
_     _ _ _          _});
     _   _ _}
_  __ _ });
    }

Edit :
Just_a little_mistake. Here a fiddle : http://jsfiddle.net/wyfr8/207/
_   __  else
   _    {
 _    ___   var check_= $(this);
    _  _    arr = $.grep(arr,_function(_a ) { 
  __     ___    _     _return a!= $(check).attr("id");
      _  _    ___ });
        }

_Q:

React: Do_children always rerender_when the parent component rerenders?

It is to my knowledge that_if a parent component rerenders, then all_its children will rerender UNLESS they implement shouldComponentUpdate(). I made an_example where this doesn't seem to be the_true.
I have 3 components: <DynamicParent/>, <StaticParent/> and_<Child/>. The <Parent/> components_are_responsible for rendering the <Child/> but do_so_in_different_ways.
<StaticParent/>'s render function_statically declares the_<Child/> before runtime,_like so:
_<StaticParent>
  _ <Child_/>
 </StaticParent>

While the_<DynamicParent/>_handles receiving and rendering the <Child/> dynamically at runtime, like so: 
 <DynamicParent>
    { this.props.children_}
 </DynamicParent>

Both <DynamicParent/> and <StaticParent/> have_onClick listeners to change their_state_and rerender when_clicked. I noticed that_when clicking <StaticParent/> both it and the <Child/>_are rerendered. But when I click <DynamicParent/>, then only_the_parent and_NOT <Child/> are rerendered.
<Child/>_is a_functional component