2017-05-12 22:23:54 +02:00
|
|
|
// Note about the application structure:
|
|
|
|
// - The user interface and its state is managed by React/Redux.
|
|
|
|
// - Persistent storage to SQLite and Web API is handled outside of React/Redux using regular JavaScript (no middleware, no thunk, etc.).
|
|
|
|
// - Communication from React to SQLite is done by calling model methods (note.save, etc.)
|
|
|
|
// - Communication from SQLite to Redux is done via dispatcher.
|
|
|
|
|
|
|
|
// So there's basically still a one way flux: React => SQLite => Redux => React
|
|
|
|
|
2017-05-10 21:51:43 +02:00
|
|
|
import { AppRegistry } from 'react-native';
|
|
|
|
import { Log } from 'src/log.js'
|
|
|
|
import { Root } from 'src/root.js';
|
2017-05-12 22:17:23 +02:00
|
|
|
import { Registry } from 'src/registry.js';
|
2017-05-10 21:51:43 +02:00
|
|
|
|
|
|
|
function main() {
|
2017-05-12 22:17:23 +02:00
|
|
|
Registry.setDebugMode(true);
|
2017-05-11 22:14:01 +02:00
|
|
|
AppRegistry.registerComponent('AwesomeProject', () => Root);
|
2017-05-14 23:51:45 +02:00
|
|
|
Log.setLevel(Registry.debugMode() ? Log.LEVEL_DEBUG : Log.LEVEL_WARN);
|
2017-05-23 21:58:12 +02:00
|
|
|
console.ignoredYellowBox = ['Remote debugger'];
|
2017-05-19 21:12:09 +02:00
|
|
|
Log.info('START ======================================================================================================');
|
2017-05-12 22:17:23 +02:00
|
|
|
// Note: The final part of the initialization process is in
|
|
|
|
// AppComponent.componentDidMount(), when the application is ready.
|
2017-05-10 21:51:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export { main }
|