Skip to content

Releases: ui-router/react

1.0.7

27 Jul 00:03
Compare
Choose a tag to compare

1.0.7 (2021-07-27)

Compare @uirouter/react versions 1.0.6 and 1.0.7

Bug Fixes

  • update classnames library which has default export type (#939) (c771405)

1.0.6

22 Dec 20:29
Compare
Choose a tag to compare

1.0.6 (2020-12-22)

Compare @uirouter/react versions 1.0.5 and 1.0.6

Bug Fixes

  • sref: do not handle clicks if the dom element has a 'target' attribute (#799) (a13b3cd), closes #786

1.0.5

21 Dec 18:38
Compare
Choose a tag to compare

1.0.5 (2020-12-21)

Compare @uirouter/react versions 1.0.4 and 1.0.5


Updated @uirouter/core from 6.0.6 to 6.0.7

Changelog for @uirouter/core:

Compare @uirouter/core versions 6.0.6 and 6.0.7

Bug Fixes

  • array: Fix decoding of array-type query parameters (44ebfae)

1.0.4

16 Dec 01:21
Compare
Choose a tag to compare

1.0.4 (2020-12-16)

Compare @uirouter/react versions 1.0.3 and 1.0.4


Updated @uirouter/core from 6.0.5 to 6.0.6

Changelog for @uirouter/core:

Compare @uirouter/core versions 6.0.5 and 6.0.6

Bug Fixes

  • params: Bi-directionally en/decode path and search params. (#618) (89e99cd)

1.0.3

29 Apr 19:41
Compare
Choose a tag to compare

1.0.3 (2020-04-29)

Compare @uirouter/react versions 1.0.2 and 1.0.3

Bug Fixes

  • examples: update animating-transitions example (3520596)

Features


Updated @uirouter/core from 6.0.4 to 6.0.5

Changelog for @uirouter/core:

Compare @uirouter/core versions 6.0.4 and 6.0.5

Bug Fixes

  • TargetState: make isDef check more thorough (e657cfe)

Features

  • urlRuleFactory: Add support for StateDeclarations in UrlRuleFactory.fromState() (539d33a)

1.0.2

24 Feb 00:03
Compare
Choose a tag to compare

1.0.2 (2020-02-24)

Compare @uirouter/react versions 1.0.1 and 1.0.2

Bug Fixes

  • Only run initialization effect on first render (7788a98)

1.0.1

04 Feb 21:58
Compare
Choose a tag to compare

1.0.1 (2020-02-04)

Compare @uirouter/react versions 1.0.0 and 1.0.1

Bug Fixes

  • Refactor UIView for compatibility with @uirouter/react-hybrid. (55d4c98)
  • Restore UIRouterConsumer and UIViewConsumer context consumer components. (3ed8ce1)
  • uiCanExit: fix uiCanExit logic and use refs so hook de/registration happens outside any render (e73daa7)

Features

  • hooks: Add useCanExit hook to block transitions from exiting a state (29d080c)
  • hooks: export useParentView for use in uirouter/react-hybrid (b5a2e80)

BREAKING CHANGES

  • UIRouterConsumer now is of type import { UIRouter } from '@uirouter/core' instead of import { UIRouterReact } from '@uirouter/react'

Updated @uirouter/core from 6.0.1 to 6.0.4

Changelog for @uirouter/core:

Compare @uirouter/core versions 6.0.1 and 6.0.4

Bug Fixes

  • hof: Rewrite curry from scratch (fc324c6), closes #350
  • IE9: Add safeConsole so IE9 doesn't break (9c8579d)
  • safeConsole: check if document is defined to avoid issues in node environments (da29d88)

Features

  • stateService: add transition option 'supercede' so transition can be ignored if one is pending (6e5a56f)

1.0.0

07 Jan 22:15
Compare
Choose a tag to compare

1.0.0 (2020-01-07)

Compare @uirouter/react versions 0.8.10 and 1.0.0

This is a long overdue release of UI-Router for React version 1.0.
This release adds a react hooks API.

Bug Fixes

  • errors: Always throw a new Error() so stacktraces are usable (26f6989)
  • typescript: Type onClick as MouseEventHandler. (7512f14)
  • UISrefActive: Avoid reusing the same array reference during setState() call (b9064cd)

Features

Add hooks:

useRouter

function GoHome() {
  const { stateService } = useRouter();
  return <button onClick={() => stateService.go('home')}>Home</a>
}

useSref

function LinkHome() {
  const sref = useSref('home')
  return <a {...sref}>Home</a>
}

<a href="/home" onClick=...>Home</a>

useSrefActive and uiSrefActiveExact

function LinkHome() {
  const sref = useSrefActive('home', {}, 'active')
  return <a {...sref}>Home</a>
}

<a href="/home" onClick=... className="active">Home</a>

useTransitionHook

function CanExit() {
  const isDirty = useIsFormDirty();
  useTransitionHook("onBefore", { exiting: 'forms' }, () => isDirty ? false : true)
}

useCurrentStateAndParams

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

useOnStateChanged

This is a callback style hook that useCurrentStateAndParams and isActive is built on top of, used to avoid excessive renders in isActive

function CurrentState() {
  const [stateName, setStateName] = useState();
  useOnStateChanged((state, params) => setStateName(state.name));
  return <div>{stateName}</div>
}

useIsActive

function CurrentState() {
  const isHomeActive = useIsActive('home');
  return <div>{isHomeActive ? 'You are home!' : 'try to find your way back'}</div>
}

0.8.10

10 Oct 19:50
Compare
Choose a tag to compare

0.8.10 (2019-10-10)

Compare @uirouter/react versions 0.8.9 and 0.8.10

Bug Fixes

  • travis: use service: xvfb instead of launching it manually. install libgconf debian package (07e6fb6)

Features

  • package: fixes to support React.StrictMode (#512) (cd8777a)

Updated @uirouter/core from 5.0.23 to 6.0.1

Changelog for @uirouter/core:

Compare @uirouter/core versions 5.0.23 and 6.0.1

Bug Fixes

  • resolve: remove unnecessary generics from CustomAsyncPolicy (#452) (61f4ee9)
  • travis: use service: xvfb instead of launching it manually (1271fcd)
  • travis: use service: xvfb instead of launching it manually. install libgconf debian package (ac1ef4b)

Features

  • resolve: Remove RXWAIT async policy in favour of allowing user defined async policy function (#366) (0ad87f6)

BREAKING CHANGES

  • resolve: RXWAIT async policy has been removed, but it never worked in the first place

0.8.9

29 Jan 19:53
Compare
Choose a tag to compare

0.8.9 (2019-01-29)

Compare @uirouter/react versions 0.8.8 and 0.8.9

Updated @uirouter/core from 5.0.22 to 5.0.23

Compare @uirouter/core versions 5.0.22 and 5.0.23

Bug Fixes

  • typescript: Fix typing of onChange callback in UrlService (961ed0f), closes #229
  • typescript: Mark params as optional in StateService.href (614bfb4), closes #287
  • vanilla: Fix baseHref parsing with chrome-extension:// urls (f11be4d), closes #304