Skip to content

Instantly share code, notes, and snippets.

Josef Richter josefrichter

View GitHub Profile
mjackson / FirebaseStateMixin.js
Last active Feb 5, 2016
A simple mixin for React components that need to bind state to a Firebase ref
View FirebaseStateMixin.js
var Firebase = require('firebase');
var baseRef = new Firebase('');
function getSnapshotValue(snapshot) {
return snapshot.val();
* A mixin for components that want to bind the value of a state variable
* to the value at a Firebase ref.
You can’t perform that action at this time.