typeless

typeless

  • Docs
  • API
  • Github

›API Reference (router)

Introduction

  • Quick Start
  • Motivation
  • Examples
  • Starters Kits
  • Roadmap

Using typeless

  • HMR
  • Code-Splitting

API Reference

  • createModule
  • createSelector
  • useActions
  • useMappedState
  • useSelector
  • ChainedReducer
  • Epic
  • Handle
  • Rx

API Reference (router)

  • createUseRouter
  • RouterActions
  • getRouterState
  • Link

API Reference (form)

  • createForm
  • FormActions

RouterActions

The actions creators for router module.

Actions

  1. $init typeless lifecycle method
  2. $unmounted typeless lifecycle method
  3. dispose dispatch this action to stop listening for history API changes. Can be useful in unit testing.
  4. locationChange: (location: RouterLocation) dispatched by router module after location changed.
  5. push: (location: LocationChange) dispatch this action to change the location, and add a new entry to the stack.
  6. replace: (location: LocationChange) similar to push, but it doesn't add a new entry to the stack.

Types

type LocationChange =
  | string
  | {
      pathname: string;
      search?: string;
    };

interface RouterLocation {
  pathname: string;
  search: string;
  type: 'push' | 'replace';
}
← createUseRoutergetRouterState →
  • Actions
  • Types
typeless
Docs
Getting StartedAPI Reference
Community
Spectrum
More
GitHub
Copyright © 2020 Łukasz Sentkiewicz