New user store structure and updated packages
This commit is contained in:
13
src/stores/index.js
Normal file
13
src/stores/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import UserStore, { USER_STORE } from './UserStore';
|
||||
import { autorun } from 'mobx';
|
||||
|
||||
const stores = {
|
||||
user: new UserStore(),
|
||||
};
|
||||
|
||||
// Persist store to localStorage
|
||||
autorun(() => {
|
||||
localStorage.setItem(USER_STORE, stores.user.asJson);
|
||||
});
|
||||
|
||||
export default stores;
|
||||
Reference in New Issue
Block a user