We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having bug when trying to use SimpleCache with Vite. My route runs as expected when not use cache, but as soon as it's used get the following error:
First example will be working, second will be what throws the error
App.tsx (working without simple cache) const routes: Route[] = [ { path: "/", element: <Home />, }, { path: "items", element: <Items />, loader: async () => ({ items: await getItems(), }), pendingElement: async () => (<div>...</div>), pendingMs: 1000, } ]; function App() { return ( <div className="App"> <Router routes={routes} location={location}> <Root /> <ReactLocationDevtools initialIsOpen={false} /> </Router> </div> ); } export default App;
App.tsx (breaks using simple cache) import { ReactLocationSimpleCache } from "@tanstack/react-location-simple-cache"; const routeCache = new ReactLocationSimpleCache(); const routes: Route[] = [ { path: "/", element: <Home />, }, { path: "items", element: <Items />, loader: routeCache.createLoader(async () => ({ items: await getItems(), })), pendingElement: async () => (<div>...</div>), pendingMs: 1000, } ]; function App() { return ( <div className="App"> <Router routes={routes} location={location}> <Root /> <ReactLocationDevtools initialIsOpen={false} /> </Router> </div> ); } export default App;
I've tried using the suggestions in #227 with using regeneratorRuntime at the top level of the app but that doesn't seem to do anything.
regeneratorRuntime
Opening this bug here as it only happens when using SimpleCache and doesn't get thrown otherwise
#227
yarn create vite --template react-ts
yarn
yarn add @tanstack/react-location @tanstack/react-location-simple-cache
Would assume following the docs this would work 🤷
No response
The text was updated successfully, but these errors were encountered:
You'll need to include the babel runtime.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Having bug when trying to use SimpleCache with Vite. My route runs as expected when not use cache, but as soon as it's used get the following error:
First example will be working, second will be what throws the error
I've tried using the suggestions in #227 with using
regeneratorRuntime
at the top level of the app but that doesn't seem to do anything.Opening this bug here as it only happens when using SimpleCache and doesn't get thrown otherwise
Your Example Website or App
#227
Steps to Reproduce the Bug or Issue
yarn create vite --template react-ts
yarn
yarn add @tanstack/react-location @tanstack/react-location-simple-cache
Expected behavior
Would assume following the docs this would work 🤷
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: