Tempeh Version 5
I have updated the Tempeh to version 5. This version has a lot of new features and improvements and also some breaking changes. I have updated the documentation to reflect the changes in the new version.
- No longer providing fetcher function in the route object. Instead, you can use better fetch wrappers like wretch, kv, or @effect/platform.
- Optimised
routeBuilderas the previous singleton pattern was causing major performance issues. - New closure based approach for
routeBuilderto provide better type safety. You can multiple instances of routeBuilder however it is not recommended. - Fewer APIs returned by
createRouteto improve DX. useParams and useSafeParams are merged into a singleuseParamshook. Similarly, useSearchParams and useSafeSearchParams are merged into a singleuseSearchParamshook. - We no longer keep track of all your routes in an internal object as it was causing performance issues. Instead, we only keep track of the base urls and the route configs.
- Test coverage has been improved.