23 |
24 |

25 |
{this.props.name}: List of users
26 |
27 |
28 | {this.props.users.loading ?
Loading
: this.renderUsers()}
29 |
30 |
31 | );
32 | }
33 | }
34 |
35 | export default createContainer(App, (db: any) => {
36 | return {
37 | users: db.collection("users")
38 | };
39 | });
40 |
--------------------------------------------------------------------------------
/examples/simple-list/src/firebaseConfig.sample.ts:
--------------------------------------------------------------------------------
1 | import * as firebase from "firebase";
2 | require("firebase/firestore");
3 |
4 | var config = {
5 | apiKey: "",
6 | authDomain: "",
7 | databaseURL: "",
8 | projectId: "",
9 | storageBucket: "",
10 | messagingSenderId: ""
11 | };
12 | firebase.initializeApp(config);
13 |
--------------------------------------------------------------------------------
/examples/simple-list/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/examples/simple-list/src/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import * as ReactDOM from "react-dom";
3 | import App from "./App";
4 | import registerServiceWorker from "./registerServiceWorker";
5 | import "./index.css";
6 |
7 | ReactDOM.render(