Skip to content

Releases: victortrusov/react-router-loading

v1.0.2

24 Apr 14:10
Compare
Choose a tag to compare

Fixes:

  • #30 Type '{ path: string; element: Element; }' is not assignable to type 'IntrinsicAttributes & RouteProps'
  • #32 Error: Could not find a declaration file for module

v1.0.0

30 May 10:44
Compare
Choose a tag to compare

React Router 6 support is here!

  • Support of React Router 5 was dropped as it's hard to support both v5 and v6 (use version 0.4.2 for React Router 5)
  • Project was migrated to Typescript and Vite
  • new hook useLoadingContext() to get LoadingContext

To migrate your project to React Router 6 use this article but import Routes and Route from react-router-loading instead of react-router-dom.

🖤 thanks @jayarjo and everyone else for great ideas!

v1.0.0-beta

30 May 00:13
Compare
Choose a tag to compare
v1.0.0-beta Pre-release
Pre-release
  • React Router 6 support
  • Migration to TS and Vite

Current npm tag v1.0.0-beta.1

v0.4.2

28 May 12:46
Compare
Choose a tag to compare
  • Add peer dependency to React 18

v0.4.1

07 Mar 23:19
Compare
Choose a tag to compare
  • #17 Correcting isLoading prop processing

v0.4.0

02 Oct 11:21
Compare
Choose a tag to compare

Better compatibility with react-router features

I redesigned all switching logic to work with RouterContext instead of just location. This change allows to get a higher level of compatibility with all react-router features, e.g. wildcards and fallback routes (#13)

Ability to change LoadingContext globally

If you're using fetching libraries that allows you to get state of fetching globally (#11), now you're able to pass this state to the Switch:

import { useIsFetching } from 'react-query';
const isFetching = useIsFetching();

<Switch isLoading={isFetching}>
...
</Switch>

This way you don't need to add extra loadingContext.done(); in your page components after fetching is done.

v0.3.0

10 Jul 12:31
Compare
Choose a tag to compare
  • Now you can specify maxLoadingTime property if you want to limit loading time. Pages will switch if loading takes more time than specified in this property
  • Memory usage and perfomance optimisation
  • Switch props for TS
  • Changed TopbarConfig to partial #10 (@PavlMais)
  • Made code a little bit cleaner

v0.2.1

11 Jun 13:14
Compare
Choose a tag to compare

#9 Typings for the package (@yashmahalwal)
Dependency update

v0.2.0

01 May 00:10
Compare
Choose a tag to compare

I changed name of the project to react-router-loading and created a new package on npm.
I kept react-router-loading package as is, but I won't update it anymore.

Also changed names for components and props:

  • PreloadSwitch became just Switch
  • preload prop became loading

More info in readme.md