@sigi-fork/react-router

React router intergration for sigi framework

Usage no npm install needed!

<script type="module">
  import sigiForkReactRouter from 'https://cdn.skypack.dev/@sigi-fork/react-router';
</script>

README

@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')
          ))
        )
      })
    )
  }
}