Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rentspree/version-check

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rentspree/version-check

Component Version for project version check

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
increased by400%
Maintainers
2
Weekly downloads
 
Created
Source

Rentspree-Version-Check

Version check component and auto refresh page for React Application!

NPM JavaScript Style Guide

Overview

When deploying a new React Application version, do you still assume all users will refresh to get the new version? Your assumption is right until you find that very user who open the browser for days without refreshing. And when you found it, it already causes you error in your application. So why bother?

This Lib help React application periodically fetch an API server to get its version. It compares the version and execute refresh if a newer version is available!

Install

npm install @rentspree/version-check

Prerequisites

The component depend on peerDependencies for the component dependencies. In order to use the component, you must have those dependencies installed in your main project.

The dependencies are defined in package.json in peerDependencies field

DependencyversionNote
prop-types^15.5.4
react^15.0.0 or ^16.0.0
react-dom^15.0.0 or ^16.0.0
styled-components^3.3.0
axios^0.18.0

Usage

Simply import the component to your project, and it will be good to go!

import React from "react"
import Version from "@rentspree/version-check"

class App extends React.Component {
  render() {
    <Version
      api="/version"
      idleTimeout={10000}
      bottom={5}
      right={5}
    />
  }
}

Props

  • api - to be called to get version number (Required)
  • idleTimeout (number) - idle time before the api is called
  • color (string) - font color
  • size - font size in px
  • top - absolute position from top in px
  • right - absolute position from right in px
  • bottom - absolute position from bottom in px
  • left - absolute position from left in px

License

Rentspree © rentspree

FAQs

Package last updated on 15 Jan 2020

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