Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Latest commit

 

History

History
35 lines (25 loc) · 611 Bytes

upgrade-3-to-4.md

File metadata and controls

35 lines (25 loc) · 611 Bytes

Upgrading from 3 to 4

Version 4 introduces push state. There are two major changes:

Config

Config now includes hash and basePath.

routerConfig : Config Route
routerConfig =
  { hash = True
  , basePath = ""
  , matchers = matchers
  , notFound = NotFoundRoute
  }

Functions require the router config

Most functions in Hop now require your router config. For example instead of:

navigateTo path
addQuery query location

It is now:

navigateTo config path
addQuery config query location

This is because Hop needs to know if you are using hash or path routing.