demo
This commit is contained in:
parent
836ff2ae13
commit
9d3aabb00b
1 changed files with 19 additions and 13 deletions
32
src/index.js
32
src/index.js
|
@ -136,29 +136,35 @@ const store = createStore(
|
|||
);
|
||||
window.store = store;
|
||||
|
||||
const persistor = persistStore(store, persistOptions, err => {
|
||||
/* const persistor = persistStore(store, persistOptions, err => {
|
||||
if (err) {
|
||||
console.log('Unable to load saved SETTINGS');
|
||||
}
|
||||
});
|
||||
window.persistor = persistor;
|
||||
window.persistor = persistor; */
|
||||
|
||||
/*
|
||||
const persistFilter = {
|
||||
'auth': ['authToken'],
|
||||
'claims': ['byId', 'claimsByUri'],
|
||||
'content': ['positions'],
|
||||
'subscriptions': ['enabledChannelNotifications', 'subscriptions'],
|
||||
'settings': ['clientSettings'],
|
||||
'tags': ['followedTags'],
|
||||
'wallet': ['receiveAddress']
|
||||
auth: ['authToken'],
|
||||
claims: ['byId', 'claimsByUri'],
|
||||
content: ['positions'],
|
||||
subscriptions: ['enabledChannelNotifications', 'subscriptions'],
|
||||
settings: ['clientSettings'],
|
||||
tags: ['followedTags'],
|
||||
wallet: ['receiveAddress'],
|
||||
};
|
||||
|
||||
store.subscribe(() => {
|
||||
const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) =>
|
||||
({ auth, claims, content, subscriptions, settings, tags, wallet }))(store.getState());
|
||||
const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => ({
|
||||
auth,
|
||||
claims,
|
||||
content,
|
||||
subscriptions,
|
||||
settings,
|
||||
tags,
|
||||
wallet,
|
||||
}))(store.getState());
|
||||
NativeModules.StatePersistor.update(state, persistFilter);
|
||||
}); */
|
||||
});
|
||||
|
||||
// TODO: Find i18n module that is compatible with react-native
|
||||
global.__ = str => str;
|
||||
|
|
Loading…
Reference in a new issue