title: Remove item using its location or key in Firebase React
body: <p>I have a simple react application and I am able to add data to it, but I am not sure how to remove/update data.
  the main problem is in getting the part where I tell firebase which data to remove. how do I tell that to firebase.
  I am using react.</p>
  
  <p>I have been trying out different things but it's just not working</p>
  
  <pre><code>handleRemove(){
    console.log('you reached handleRemove function');
    var ref =firebase.database().ref('items');
    ref.on('value',this.handlegetData,this.handleErrData);
    ['items']['KpAmo20xP6HPXc7cwjY'].remove();
    //itemsRef.remove('KpAmo20xP6HPXc7cwjY');
  }
  </code></pre>
  
  <p>Please tell me how to do this.</p>
  
  <p>My firebase database looks somewhat like this
  <a href="https://i.stack.imgur.com/WXN56.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WXN56.png" alt="enter image description here"></a></p>