UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

25 lines (19 loc) 417 B
import { action, makeObservable, observable } from 'mobx'; export class AuthStore { user: any = null; isAuth: boolean = false; constructor() { makeObservable(this, { user: observable, isAuth: observable, setUser: action, setIsAuth: action, }); } public setUser(user: any) { this.user = user; } public setIsAuth(isAuth: boolean) { this.isAuth = isAuth; } }