Skip to content

Instantly share code, notes, and snippets.

@thomas-jeepe
Last active June 6, 2016 12:57
Show Gist options
  • Save thomas-jeepe/327dd0f86f30d67efe4da413e5063d77 to your computer and use it in GitHub Desktop.
Save thomas-jeepe/327dd0f86f30d67efe4da413e5063d77 to your computer and use it in GitHub Desktop.
My files
import * as React from 'react'
import store from './InfoStore'
import { observer } from 'mobx-react'
import Paper from 'material-ui/Paper'
const styles = require('../../../endpoint/css/DetailPage.css')
export default observer(({ header }) =>
<Paper className={styles.infoGrid}>
<h2 className={styles.gridHeader}>{header}</h2>
<p className={styles.gridText}>{store.text}</p>
</Paper>
)
import * as React from 'react'
import Loading from '../../helpers/Loading'
import { observer } from 'mobx-react'
import ClientInfo from './ClientInfo'
import HistoryGrid from './history/HistoryGrid'
import store from './InfoStore'
import ErrorMessage from '../../helpers/ErrorMessage'
const styles = require('../../../endpoint/css/DetailPage.css')
import Paper from 'material-ui/Paper'
export default observer(() =>
<Paper className={styles.mainScreenWrapper}>
<ClientInfo header='Client History'/>
<ErrorMessage store={store}/>
{ store.loading ? <Loading/> : <HistoryGrid className={styles.historyGrid}/> }
</Paper>)
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import * as injectTapEventPlugin from 'react-tap-event-plugin'
import DetailsPage from './bundles/details/DetailsPage'
// this is only the relevant parts
index.js:151 Uncaught TypeError: Cannot read property 'render' of undefined
observer @ index.js:151
(anonymous function) @ ClientInfo.js:9
__webpack_require__ @ bootstrap 29962d7…:555
fn @ bootstrap 29962d7…:86
(anonymous function) @ DetailsPage.js:4
__webpack_require__ @ bootstrap 29962d7…:555
fn @ bootstrap 29962d7…:86
(anonymous function) @ Index.tsx:4
__webpack_require__ @ bootstrap 29962d7…:555
fn @ bootstrap 29962d7…:86
(anonymous function) @ bootstrap 29962d7…:578
__webpack_require__ @ bootstrap 29962d7…:555
(anonymous function) @ bootstrap 29962d7…:578
(anonymous function) @ bootstrap 29962d7…:578
client.js:55[HMR] connected
{
"compilerOptions": {
"target": "ES6",
"allowJs": true,
"experimentalDecorators": true,
"module": "commonjs",
"removeComments": true,
"jsx": "react"
},
"exclude": [
"node_modules"
]
}
var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
devtool: 'source-map',
entry: [
'webpack-hot-middleware/client',
'./src/app/Index.tsx'
],
output: {
path: __dirname + '/src/endpoint/static',
filename: 'app.js',
publicPath: '/static/'
},
plugins: [
new ExtractTextPlugin('style.css', { allChunks: true }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
resolve: {
extensions: ['', '.ts', '.tsx', '.js']
},
module: {
loaders: [{
test: /\.ts$/,
loaders: ['awesome-typescript-loader']
},{
test: /\.tsx$/,
loaders: ['awesome-typescript-loader']
},{
test: /\.js$/,
loaders: ['awesome-typescript-loader'],
exclude: /node_modules/
},{
test: /\.css$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment