index.js 471B

123456789101112131415161718192021
  1. import React from 'react'
  2. import ReactDOM from 'react-dom'
  3. import PageHtml from './container/PageHtml.jsx'
  4. require('./css/index.styl')
  5. const appInterface = class appInterface {
  6. renderApp = (domId, app) => {
  7. return ReactDOM.render(
  8. <PageHtml app={app} />
  9. , document.getElementById(domId)
  10. )
  11. }
  12. unountApp = domId => {
  13. return ReactDOM.unmountComponentAtNode(document.getElementById(domId)) // returns bool
  14. }
  15. }
  16. module.exports = appInterface