packages/app-frontend/src/app.js
/**
 * Connect then init the app. We need to reconnect on every reload, because a
 * new backend will be injected.
 */
Connect then init the app. We need to reconnect on every reload, because a
new backend will be injected.
Connect then init the app . We need to reconnect on every reload because a new backend will be injected .
function connectApp (app, shell) {
  shell.connect(async bridge => {
    setBridge(bridge)
    window.bridge = bridge
    if (Object.prototype.hasOwnProperty.call(Vue.prototype, '$shared')) {
      destroySharedData()
    } else {
      Object.defineProperty(Vue.prototype, '$shared', {
        get: () => SharedData
      })
    }
    initEnv(Vue)
    await initSharedData({
      bridge,
      persist: true,
      Vue
    })
    if (SharedData.logDetected) {
      bridge.send('log-detected-vue')
    }
    setupAppsBridgeEvents(bridge)
    setupComponentsBridgeEvents(bridge)
    setupTimelineBridgeEvents(bridge)
    setupCustomInspectorBridgeEvents(bridge)
    setAppConnected(true)
    setAppInitializing(false)
  })
}
function connectApp ( app , shell ) { shell . connect ( async bridge => { setBridge ( bridge ) window . bridge = bridge if ( Object . prototype . hasOwnProperty . call ( Vue . prototype , '$shared' ) ) { destroySharedData ( ) } else { Object . defineProperty ( Vue . prototype , '$shared' , { get : ( ) => SharedData } ) } initEnv ( Vue ) await initSharedData ( { bridge , persist : true , Vue } ) if ( SharedData . logDetected ) { bridge . send ( 'log-detected-vue' ) } setupAppsBridgeEvents ( bridge ) setupComponentsBridgeEvents ( bridge ) setupTimelineBridgeEvents ( bridge ) setupCustomInspectorBridgeEvents ( bridge ) setAppConnected ( true ) setAppInitializing ( false ) } ) }
Connect then init the app.
Connect then init the app .
// @TODO remove // @TODO bridge listeners