Skip to content

Instantly share code, notes, and snippets.

@loraxx753
Last active July 9, 2018 03:35
Show Gist options
  • Save loraxx753/547360c81e361ec5f8889ee9f492e956 to your computer and use it in GitHub Desktop.
Save loraxx753/547360c81e361ec5f8889ee9f492e956 to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import firebase from "../firebase.js";
const FirebasePromise = props => {
return props.children("testing, 1 2 3");
};
// firebase
// .storage()
// .ref()
// .child("images/" + props.fileName)
// .getDownloadURL()
const Example = props => (
<FirebasePromise fileName={props.fileName}>
{returningThing => <p>{typeof returningThing}</p>}
</FirebasePromise>
);
const Image = ({ image }) => {
console.log(image);
return (
<li>
<Example fileName={image.fileName} />
<div>{image.imageID}</div>
<div>{image.imageDate}</div>
</li>
);
};
export default Image;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment