@sigi-fork/react-router
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@sigi/react-router

React router intergration for sigi framework

Usage

import { RouterModule } from '@sigi/react-router'

@Module('App')
export class AppModule extends EffectModule<{}> {
  constructor(private readonly router: RouterModule) {
    super()
  }

  @Effect()
  getUser(payload$: Observable<void>) {
    return payload$.pipe(
      exhaustMap(() => {
        service.getUser().pipe(
          mergeMap((res) => of(
            this.getActions().getUserResponse(res),
            this.router.push('/home')
          ))
        )
      })
    )
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @sigi-fork/react-router

Homepage

sigi.how

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

34.7 kB

Total Files

11

Last publish

Collaborators

  • xiaomuzhu