• JavaScript
  • JSP
  • PHP
  • jQuery
  • Spring
  • Java IO
  • RubyonRails
  • Servlet
  • Struts

  • <

    Reactjs Keys

    Reactjs Keys are used to identify which items have changed, updated, or deleted from the Lists.It is useful when we dynamically created components or when the users alter the lists.Keys should be given inside the array to give the elements a stable identity.


    Example



    
    const stringLists = [ 'sunil, 'jitu', 'kabir'];   
        
    const updatedLists = stringLists.map((strList)=>{   
        <li key={strList.id}> {strList} </li>   
    });   
    
    















    © copyright 2017-2021 Completedone pvt ltd.