-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ios.js
More file actions
57 lines (48 loc) · 1.47 KB
/
index.ios.js
File metadata and controls
57 lines (48 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"use strict";
require('js-base64'); // will init global Base64 object
var React = require("react-native");
var App = require("./src/App.js");
var Fluxxor = require("fluxxor");
var stores = require("./src/stores/");
var actions = require("./src/actions/");
var flux = new Fluxxor.Flux(stores, actions);
flux.actions.analytics.launchApp();
flux.stores.settings.on("change", suncQueue);
flux.stores.pocketQueue.on("change", suncQueue);
function suncQueue() {
if (flux.stores.settings.isConnected()) {
flux.actions.pocketQueue.sync();
}
}
/*=============================
= DEBUG =
=============================*/
// flux.on("dispatch", (type, payload) => {
// // console.log("[Dispatch]", type, JSON.stringify(payload));
// console.log("[Dispatch]", type, payload);
// });
// window.flux = flux;
// var { AsyncStorage } = require("react-native");
// window.AsyncStorage = AsyncStorage;
// window.getAllInAsyncStorage = () => {
// AsyncStorage.getAllKeys()
// .then(value => {
// console.log("AsyncStorage.getAllKeys:",value);
// return AsyncStorage.multiGet(value)
// })
// .then(value => {
// console.log("AsyncStorage.multiGet:",value);
// })
// .catch(err => {
// console.log("AsyncStorage.err:" ,err);
// });
// }
/*----- End of DEBUG ------*/
var FastPaper = React.createClass({
render() {
return (
<App flux={flux} />
);
}
});
React.AppRegistry.registerComponent("FastPaper", () => FastPaper);