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;
|
window.store = store;
|
||||||
|
|
||||||
const persistor = persistStore(store, persistOptions, err => {
|
/* const persistor = persistStore(store, persistOptions, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('Unable to load saved SETTINGS');
|
console.log('Unable to load saved SETTINGS');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.persistor = persistor;
|
window.persistor = persistor; */
|
||||||
|
|
||||||
/*
|
|
||||||
const persistFilter = {
|
const persistFilter = {
|
||||||
'auth': ['authToken'],
|
auth: ['authToken'],
|
||||||
'claims': ['byId', 'claimsByUri'],
|
claims: ['byId', 'claimsByUri'],
|
||||||
'content': ['positions'],
|
content: ['positions'],
|
||||||
'subscriptions': ['enabledChannelNotifications', 'subscriptions'],
|
subscriptions: ['enabledChannelNotifications', 'subscriptions'],
|
||||||
'settings': ['clientSettings'],
|
settings: ['clientSettings'],
|
||||||
'tags': ['followedTags'],
|
tags: ['followedTags'],
|
||||||
'wallet': ['receiveAddress']
|
wallet: ['receiveAddress'],
|
||||||
};
|
};
|
||||||
|
|
||||||
store.subscribe(() => {
|
store.subscribe(() => {
|
||||||
const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) =>
|
const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => ({
|
||||||
({ auth, claims, content, subscriptions, settings, tags, wallet }))(store.getState());
|
auth,
|
||||||
|
claims,
|
||||||
|
content,
|
||||||
|
subscriptions,
|
||||||
|
settings,
|
||||||
|
tags,
|
||||||
|
wallet,
|
||||||
|
}))(store.getState());
|
||||||
NativeModules.StatePersistor.update(state, persistFilter);
|
NativeModules.StatePersistor.update(state, persistFilter);
|
||||||
}); */
|
});
|
||||||
|
|
||||||
// TODO: Find i18n module that is compatible with react-native
|
// TODO: Find i18n module that is compatible with react-native
|
||||||
global.__ = str => str;
|
global.__ = str => str;
|
||||||
|
|
Loading…
Reference in a new issue