Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

inline-scripts.tsx

24 lines552 Bytes

1import { createFileRoute } from '@tanstack/vue-router'
2​
3export const Route = createFileRoute('/inline-scripts')({
4 head: () => ({
5 scripts: [
6 {
7 children: `window.INLINE_SCRIPT_1 = true`,
8 },
9 {
10 children: `window.INLINE_SCRIPT_2 = "test"`,
11 },
12 ],
13 }),
14 component: InlineScriptsComponent,
15})
16​
17function InlineScriptsComponent() {
18 return (
19 <div class="p-2">
20 <h3 data-testid="inline-scripts-test-heading">Inline Scripts Test</h3>
21 <p>Check console for inline script logs.</p>
22 </div>
23 )