useResolve

A hook to resolve urls like the router.

import { useResolve } from 'react-sprout';

let resolve = useResolve();
  • Name
    resolve
    Type
    function
    Description

    A function to resolve urls

Resolve

resolve(path, options);
  • Name
    path
    Type
    string
    Description

    The path to resolve

  • Name
    options
    Type
    object
    Description

    The resolve options

Resolve options

  • Name
    options.relative
    Type
    boolean
    Description

    A boolean indicating whether to resolve relative to the route.