Sha256: 3eed7786ae14950479fafc811bfeb05e12286d6c8ad4f0c2734d94ba08d8ed5e

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

import React from 'react'
import { render } from 'react-dom'

import App from '../react/components/App'
import RedBox from 'redbox-react'

document.addEventListener('DOMContentLoaded', () => {
  let reactElement = document.getElementById('app')

  if (reactElement) {
    if(window.railsEnv && window.railsEnv === 'development'){
      try {
        render(<App />, reactElement)
      } catch (e) {
        render(<RedBox error={e} />, reactElement)
      }
    }
    else {
      render(<App />, reactElement)
    }
  }
})

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
make_it_so-0.6.0 templates/rails/app/javascript/packs/new_application.js
make_it_so-0.5.1 templates/rails/app/javascript/packs/new_application.js
make_it_so-0.5.0 templates/rails/app/javascript/packs/new_application.js
make_it_so-0.4.5 templates/rails/app/javascript/packs/new_application.js