Releases: victortrusov/react-router-loading
v1.0.2
v1.0.0
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 getLoadingContext
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
- React Router 6 support
- Migration to TS and Vite
Current npm tag v1.0.0-beta.1
v0.4.2
- Add peer dependency to React 18
v0.4.1
v0.4.0
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
v0.2.1
#9 Typings for the package (@yashmahalwal)
Dependency update
v0.2.0
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 justSwitch
preload
prop becameloading
More info in readme.md