Methods

Methods


createLocation

Creates SearchLocation from a path or Location

import { createLocation } from '@resourge/react-hook-table';

createLocation(location)

createLocation('/products?productId=10#hash')

createPath

Creates path from SearchLocation

import { createPath } from '@resourge/react-hook-table';

createPath(searchLocation)

parseParams

Params object into search path

import { parseParams } from '@resourge/react-hook-table';

parseParams({
  productId: 10,
  productName: 'Apple'
})
// ?productId=10&productName=Apple

parseSearch

Converts search string into object.

import { parseSearch } from '@resourge/react-hook-table';

parseSearch('?productId=10&productName=Apple')
// {
//   productId: 10,
//   productName: 'Apple'
// }