Skip to content
New issue

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

createSSRApp() should be called in client mode #410

Open
5 of 7 tasks
infinnie opened this issue Jul 9, 2024 · 1 comment
Open
5 of 7 tasks

createSSRApp() should be called in client mode #410

infinnie opened this issue Jul 9, 2024 · 1 comment

Comments

@infinnie
Copy link

infinnie commented Jul 9, 2024

Describe the bug

The documentation on createSSRApp() says, (https://vuejs.org/api/application.html#createssrapp )

Creates an application instance in SSR Hydration mode. Usage is exactly the same as createApp().

And its demo code is like

// this runs in the browser.
import { createSSRApp } from 'vue'

const app = createSSRApp({
  // ...same app as on server
})

// mounting an SSR app on the client assumes
// the HTML was pre-rendered and will perform
// hydration instead of mounting new DOM nodes.
app.mount('#app')

Reproduction

? createClientApp(App)

System Info

n/a

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
@Shyam-Chen
Copy link

Shyam-Chen commented Jul 16, 2024

async function createApp(client = false, routePath?: string) {

client has a default parameter set to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants