Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
@duannx/vue-client-only
[![npm](https://img.shields.io/npm/v/vue-client-only.svg)](https://www.npmjs.com/package/vue-client-only) [![license](https://img.shields.io/github/license/duannx/vue-client-only.svg)]()
@ikun-ui/client-only
@vue-cdk/client-only
openapi-fetch
Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.
Vue component to wrap non SSR friendly components (428 bytes)
npm install vue-client-only
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
98.9
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (62.86%)
TypeScript (21.85%)
Vue (15.29%)
Total Downloads
76,970,638
Last Day
21,776
Last Week
162,057
Last Month
810,858
Last Year
11,137,591
474 Stars
41 Commits
37 Forks
6 Watching
23 Branches
8 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
vue-client-only@2.1.0
Size
3.46 kB
NPM Version
7.15.1
Node Version
16.2.0
Publised On
03 Jun 2021
Cumulative downloads
Total Downloads
Last day
-39.8%
21,776
Compared to previous day
Last week
-16.6%
162,057
Compared to previous week
Last month
0.4%
810,858
Compared to previous month
Last year
-32.8%
11,137,591
Compared to previous year
8
1yarn add vue-client-only
This project is previously known as vue-no-ssr, switch to 1.x branch for the old docs.
1<template> 2 <div id="app"> 3 <h1>My Website</h1> 4 <client-only> 5 <!-- this component will only be rendered on client-side --> 6 <comments /> 7 </client-only> 8 </div> 9</template> 10 11<script> 12 import ClientOnly from 'vue-client-only' 13 14 export default { 15 components: { 16 ClientOnly 17 } 18 } 19</script>
Use a slot or text as placeholder until <client-only />
is mounted on client-side.
eg, show a loading indicator.
1<template> 2 <div id="app"> 3 <h1>My Website</h1> 4 <!-- use slot --> 5 <client-only> 6 <comments /> 7 Â Â Â <comments-placeholder slot="placeholder" /> 8 Â Â </client-only> 9 <!-- or use text --> 10 <client-only placeholder="Loading..."> 11 <comments /> 12 </client-only> 13 </div> 14</template> 15 16<script> 17 import ClientOnly from 'vue-client-only' 18 19 export default { 20 components: { 21 ClientOnly 22 } 23 } 24</script>
By default the placeholder will be wrapped in a div
tag, however you can use placeholderTag
prop to customize it:
1<client-only placeholder="loading" placeholder-tag="span"> 2 <comments /> 3</client-only>
And you get:
1<span class="client-only-placeholder"> 2 loading 3</span>
If prop placeholder
is an empty string (or null
) and no placeholder
slot is found, then <client-only>
will render the Vue placeholder element <!---->
instead of rendering the placholder-tag
during SSR render.
1yarn install 2 3# Run example 4yarn example
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
vue-client-only © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @_egoistlily
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/19 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
114 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More