In this video, we’ll tie in ReactFire from Firebase in order to implement persistence into our application for our Notes component as well as walk through how to properly display a list of data.
If I'm not mistaken, ReactFire will unbind the refs that you bind automatgically (here).
However, because you create an additional reference to a Firebase that is not explicitly bound, do you not have to clean up that one? I'm talking about the
this.ref = new Firebase('...'); I'm asking honestly. I don't know whether you have to clean that up yourself or not.
I see some people I little frustrated because of the Firebase part: just create an account in case you don't have one. In Firebase go to Data in the upper right corner. Go to this link http://cloud.egghead.io/code/0s1a2x2X3P2c and copy that JSON or download the file, you once do it, create a JSON file with that info, then hit Import Data, and select the JSON file you just create. That's it.
this.ref = new Firebase('https://githubnote-taker.firebaseio.com');
var childRef = this.ref.child(this.getParams().username);
This is what i have, but when i run this, my notes shows both the property and the value like this
Notes: What a guy-JugSizVlM-1ijz6OPxZNew note-JugSlbdwr9jTIZZjurt
What am i doing wrong? how do i get just the value like in the video?
npm install email@example.com --save
console inspect shows me reactfire package file line 16 as an error. So its there and all, however itself triggers an error.
this is how i require:
var ReactFireMixin = require('reactfire');
and it instantly gives an error.
Instead of Github, here is an archive.
You're correct on the ReactFire automagical unbounding comment. (but explicit is better, right? :) ).
About this.ref, I've never worried (or seen anyone worry) about cleaning up any new instances of Firebase. I could be mistaken (really hope I'm not) but I don't think you have to clean up instances of Firebase like you would, say setting an actual listener.