🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

ui-app

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ui-app

Common elements to setting up a UI project.

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
2
Created
Source

UI-App

Reducing Web and Native application boilerplate.

Complete Example

import App from 'ui-app/web'

/**
 * The main application.
 */
class MyApp extends App {

  constructor(...args) {
    super(...args)  

    // Redux-persist runs automatically, supply a whitelist of
    // store keys to persist.
    this.persistWhitelist = [
      'auth'
    ]

    // Able to swtich off dev-tools for performance reasons, if needed.
    this.noDevTools = true

    // Specify an application version to be displayed each time the app
    // is run in order to help identify the current bundle.
    this.version = '0.1.0'
  }

  /**
   * Return a dictionary of reducers to add to Redux.
   */
  getReducers() {
    return {
      ...super.getReducers(),
      auth: require('auth/reducers').default
    }
  }

  /**
   * Return a list of root sagas to run.
   */
  getSagas() {
    return [
      ...super.getSagas(),
      require('auth/sagas').default()
    ]
  }

  /**
   * Load the primary React component to mount and render.
   */
  loadMainComponent() {
    return require('./MainView').default
  }

  /**
   * The entrypoint of the application, add in any special
   * operations you need to perform here.
   */
  run() {
    super.run()
  }

}

/*
 * Begin firing up our application.
 */
const app = new MyApp()
app.run()

export default app

FAQs

Package last updated on 18 Sep 2018

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