-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugins): update generation + support pending, error, loader, ac…
…tion
- Loading branch information
Showing
6 changed files
with
83 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
export const PendingComponent = () => <div>Pending</div> | ||
export const ErrorComponent = () => <div>Error</div> | ||
|
||
export const Loader = () => console.log('Loader') | ||
export const Action = () => console.log('Action') | ||
|
||
export default function Home() { | ||
return <h1>Home - Basic</h1> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const template = `// Generouted, changes to this file will be overriden | ||
import { Fragment } from 'react' | ||
import { createReactRouter, createRouteConfig, lazy, RouterProvider } from '@tanstack/react-router' | ||
// imports | ||
// modules | ||
const config = root.addChildren([ | ||
// config, | ||
_404, | ||
]) | ||
const router = createReactRouter({ routeConfig: config, defaultPreload: 'intent' }) | ||
declare module '@tanstack/react-router' { | ||
interface RegisterRouter { | ||
router: typeof router | ||
} | ||
} | ||
export const Routes = () => <RouterProvider router={router} /> | ||
` |