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
|
|
|
|
|
2019-02-28 01:41:32 +02:00
|
|
|
// console.disableYellowBox = true
|
2018-10-13 11:32:44 +02:00
|
|
|
|
2020-06-08 08:41:04 +02:00
|
|
|
import { YellowBox, AppRegistry } from 'react-native';
|
2019-07-21 18:16:15 +02:00
|
|
|
YellowBox.ignoreWarnings([
|
|
|
|
'Require cycle: node_modules/react-native-',
|
|
|
|
'Require cycle: node_modules/rn-fetch-blob',
|
2020-03-06 20:49:30 +02:00
|
|
|
'Warning: componentWillReceiveProps has been renamed',
|
|
|
|
'Warning: componentWillUpdate has been renamed',
|
|
|
|
'Warning: componentWillMount has been renamed',
|
2019-07-21 18:16:15 +02:00
|
|
|
]);
|
2018-03-09 22:59:12 +02:00
|
|
|
const { Root } = require('./root.js');
|
2017-05-10 21:51:43 +02:00
|
|
|
|
2020-04-19 11:11:46 +02:00
|
|
|
// Disable buggy Fast Refresh
|
2020-06-08 08:41:04 +02:00
|
|
|
// NOTE: not working - can make the app go into an infinite crash/restart loop
|
|
|
|
// if (__DEV__) {
|
|
|
|
// const { DevSettings } = NativeModules;
|
|
|
|
// DevSettings.setHotLoadingEnabled(false);
|
|
|
|
// DevSettings.setLiveReloadEnabled(false);
|
|
|
|
// }
|
2020-04-19 11:11:46 +02:00
|
|
|
|
2017-05-10 21:51:43 +02:00
|
|
|
function main() {
|
2018-03-09 22:59:12 +02:00
|
|
|
AppRegistry.registerComponent('Joplin', () => Root);
|
|
|
|
console.ignoredYellowBox = ['Remote debugger'];
|
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
|
|
|
}
|
|
|
|
|
2019-07-30 09:35:42 +02:00
|
|
|
module.exports = { main };
|