1.0.2 • Published 6 years ago

@jsxeu/core v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

React Higher Order Component

React electron updater HOC to update electron fused react desktop apps.

NPM JavaScript Style Guide

Install

npm install --save @jsxeu/core

Usage

import React, { Component } from 'react'

import reactElectronUpdater from '@jsxeu/core'

class MyApp extends Component {

  checkForUpdate = () => {
    this.props.checkForUpdate().subscribe(response=>{
      console.log(response);
    })
  }

  download = () => {
    this.props.download().subscribe(response=>{
      console.log(response);
    })
  }

  install = () => {
    this.props.install().subscribe(response=>{
      console.log(response);
    })
  }

  hasPendingUpdates = () => {
    console.log(this.props.hasPendingUpdates());
  }

  render () {
    return (
      .....

    )
  }
}
const releaseInfo = {
  user: 'salilvnair',
  repo: 'myrepo',
  appName: 'myapp'
};

export default reactElectronUpdater(releaseInfo)(MyApp);

License

MIT © salilvnair