How to use the aurelia-store.connectTo function in aurelia-store

To help you get started, we’ve selected a few aurelia-store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Vheissu / builtwithaurelia / src / routes / home.ts View on Github external
sortCategories,
    changeSortMode,
    sortProjects,
    castVote
} from '../store/actions';

import { State } from '../store/state';

import { Api } from '../services/api';
import { ApplicationService } from '../services/application';
import { UserService } from '../services/user';
import { getColourFromHashedString, slugify } from '../common';

import firebase from '../common/firebase';

@connectTo()
@autoinject()
export class Home {
    private state: State;

    constructor(
        private api: Api,
        private appService: ApplicationService,
        private userService: UserService,
        private ea: EventAggregator,
        private router: Router,
        private store: Store,
        private taskQueue: TaskQueue) {
    }

    async canActivate(params) {
        await dispatchify(getCategories)();
github Vheissu / builtwithaurelia / src / app.ts View on Github external
import {
    loadProjects,
    getCategories,
    setCategory,
    backupProjects,
    sortCategories,
    setUser,
    loadProject,
    changeSortMode,
    sortProjects,
    castVote
} from './store/actions';

import { ProjectModel, ProjectModelInterface } from './common/models/project';

@connectTo()
@autoinject()
export class App {
    private router: Router;
    public categories;

    @observable showHat: boolean = false;
    private showHatLogin: boolean = false;
    private showHatRegister: boolean = false;
    private showHatSubmission: boolean = false;

    private submissionModel: ProjectModelInterface = {
        name: null,
        category: null,
        description: null,
        url: null
    };

aurelia-store

Aurelia single state store based on RxJS

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis