title: set is not a function on a firebaseRef object
body: <p>This is an example from the Firebase documentation</p>
  
  <pre><code>function writeUserData(userId, name, email, imageUrl) {
      firebase.database().ref('users/' + userId).set({
          username: name,
          email: email,
          profile_picture : imageUrl
      });
  }
  </code></pre>
  
  <p>And here's my code:</p>
  
  <pre><code>componentDidMount() {
      const questionsRef = firebase.database().ref('Works').orderByChild('firebaseKey').equalTo(this.props.questionId);
      console.log(this.props.questionId);
      questionsRef.on('value', snapshot =&gt; {
          let questions = snapshot.val();
          let newState = [];
          for (let question in questions) {
              newState.push({
                  id: question,
                  category: questions[question].category,
                  level: questions[question].level,
                  pointAmount: questions[question].pointAmount,
                  pointBoost: questions[question].pointBoost,
                  photoURL: questions[question].photoURL,
                  workText: questions[question].workText,
              });
          }
          this.setState({
              questions: newState
          });
      });
      questionsRef.set({state: 'Taken', available: false});
  }
  </code></pre>
  
  <p>Now, when I try to run it, the first query works fine, but the <code>questionsRef.set({state: 'Taken', available: false});</code> just throws an error, stating: <code>questionsRef.set is not a function</code>. Why is that? What am I missing?</p>
  
  <p>My db structure:</p>
  
  <pre><code>"Works" : {
      "-LETUpQgZUUUhDfMo3XC" : {
          "available" : false,
          "boostAmount" : 8,
          "category" : "Fizyka",
          "createDate" : {
              "date" : 8,
              "day" : 5,
              "hours" : 10,
              "minutes" : 24,
              "month" : 5,
              "seconds" : 37,
              "time" : 1528446277672,
              "timezoneOffset" : -120,
              "year" : 118
          }
      },
      // More stuff
  }
  </code></pre>