mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Add no-ssr example
This commit is contained in:
parent
fb25c982a7
commit
222f50e139
3
examples/no-ssr/README.md
Normal file
3
examples/no-ssr/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Hello World with Nuxt.js
|
||||
|
||||
https://nuxtjs.org/examples
|
11
examples/no-ssr/package.json
Normal file
11
examples/no-ssr/package.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "no-ssr-cmp-nuxt",
|
||||
"dependencies": {
|
||||
"nuxt": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "nuxt",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start"
|
||||
}
|
||||
}
|
17
examples/no-ssr/pages/index.vue
Executable file
17
examples/no-ssr/pages/index.vue
Executable file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<h1>Home</h1>
|
||||
<no-ssr placeholder="Loading...">
|
||||
<h2>This part is rendered on the client-side only</h2>
|
||||
</no-ssr>
|
||||
<no-ssr>
|
||||
<p><code>placeholder</code> prop is optional</p>
|
||||
</no-ssr>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.no-ssr-placeholder {
|
||||
color: #41b883;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user