"hooks/useCurrentStateAndParams" | @uirouter/react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "hooks/useCurrentStateAndParams"

Index

Functions

useCurrentStateAndParams

  • A hook that returns the current state and parameter values.

    Each time the current state or parameter values change, the component will re-render with the new values.

    Example:

    function CurrentState() {
      const { state, params } = useCurrentStateAndParams();
      return <span>{state.name} ({JSON.stringify(params)})</span>;
    }

    Returns { params: RawParams; state: StateDeclaration }

Generated using TypeDoc