Socket
Socket
Sign inDemoInstall

vue-no-ssr

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-no-ssr

Vue component to wrap non SSR friendly components


Version published
Weekly downloads
192K
decreased by-4.68%
Maintainers
1
Weekly downloads
 
Created

What is vue-no-ssr?

The vue-no-ssr package is a Vue.js component that allows you to conditionally render parts of your application only on the client-side, effectively preventing server-side rendering (SSR) for those parts. This is particularly useful for components that rely on browser-specific APIs or need to access the window or document objects.

What are vue-no-ssr's main functionalities?

Client-Side Only Rendering

This feature allows you to wrap any content inside the <no-ssr> component to ensure it is only rendered on the client-side. This is useful for components that depend on browser-specific features.

<template>
  <div>
    <no-ssr>
      <p>This content will only be rendered on the client-side.</p>
    </no-ssr>
  </div>
</template>

<script>
import NoSSR from 'vue-no-ssr';

export default {
  components: {
    NoSSR
  }
};
</script>

Fallback Content

You can provide fallback content that will be displayed while the client-side content is being loaded. This is useful for improving the user experience by showing a loading indicator or placeholder.

<template>
  <div>
    <no-ssr placeholder="<p>Loading...</p>">
      <p>This content will only be rendered on the client-side.</p>
    </no-ssr>
  </div>
</template>

<script>
import NoSSR from 'vue-no-ssr';

export default {
  components: {
    NoSSR
  }
};
</script>

Other packages similar to vue-no-ssr

FAQs

Package last updated on 25 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc