How to use the framework.register function in framework

To help you get started, we’ve selected a few framework 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 vocoWone / reaux / src / module / intro / home / index.ts View on Github external
*onLoad(): SagaIterator {
        //
    }

    *home(): SagaIterator {
        //
    }
    *pushHistory(url: string): SagaIterator {
        yield* this.setHistory(url);
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("home", initialState), Component);
github vocoWone / reaux / src / module / intro / about / index.ts View on Github external
name: "string",
};

class ActionHandler extends Model {
    *about(): SagaIterator {
        //
    }
    *onInitialized(): SagaIterator {
        yield* this.setState({});
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("about", initialState), Component);
github vocoWone / reaux / src / module / intro / resume / index.ts View on Github external
};

class ActionHandler extends Model {
    *resume(): SagaIterator {
        //
    }

    *onInitialized(): SagaIterator {
        yield* this.setState({});
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("resume", initialState), Component);
github vocoWone / reaux / src / module / common / footer / index.ts View on Github external
};

class ActionHandler extends Model {
    *footer(): SagaIterator {
        //
    }

    *onInitialized(): SagaIterator {
        yield* this.setState({});
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("footer", initialState), Component);
github vocoWone / reaux / src / module / main / index.ts View on Github external
class ActionHandler extends Model {
    @Lifecycle()
    @Loading()
    *onLoad(): SagaIterator {
        yield delay(2000, {});
    }

    *onInitialized(): SagaIterator {
        yield* this.setState({});
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("main", initialState), Component);
github vocoWone / reaux / src / module / common / header / index.ts View on Github external
//
    }

    *onInitialized(): SagaIterator {
        yield* this.setState({});
    }

    *pushHistoryByNav(url: string): SagaIterator {
        yield* this.setHistory(url);
    }

    *test(): SagaIterator {
        yield* this.setState({name: "voco"});
    }
}
export const {Controller, View} = register(new ActionHandler("header", initialState), Component);