diff --git a/resources/js/Pages/title-and-meta.jsx b/resources/js/Pages/title-and-meta.jsx index 05c8de9f..5486d371 100644 --- a/resources/js/Pages/title-and-meta.jsx +++ b/resources/js/Pages/title-and-meta.jsx @@ -115,14 +115,36 @@ export default function () { JavaScript file. A common use case for the title callback is automatically adding an app name before or after each page title.

- \`\${title} - My App\`, - // ... - }) - `} + \`\${title} - My App\`, + // ... + }) + `, + }, + { + name: 'React', + language: 'js', + code: dedent` + createInertiaApp({ + title: title => \`\${title} - My App\`, + // ... + }) + `, + }, + { + name: 'Svelte', + language: 'js', + code: dedent` + // Not supported + `, + }, + ]} />

After defining the title callback, the callback will automatically be invoked when you set a title