0.3.0 • Published 6 years ago

ui-app v0.3.0

Weekly downloads
1
License
UNLICENSED
Repository
github
Last release
6 years ago

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
0.3.0

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago