A design language for premium, dark-themed knowledge interfaces.
"Numbers are heroes, labels are whispers."
| { | |
| "name": "webpack-cs-ltc", | |
| "version": "1.0.0", | |
| "description": "A simple boilerplate for Webpack 3, dynamic imports, code splitting, and long term caching.", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "webpack --config webpack.config.js", | |
| "dev-server": "webpack-dev-server", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, |
| { | |
| "presets": [ | |
| "react", | |
| ["env", { | |
| "targets": { | |
| "browsers": ["last 2 versions"] | |
| } | |
| }], | |
| "stage-0" | |
| ], |
| const webpack = require('webpack'); | |
| const path = require('path'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const APP_DIR = path.resolve(__dirname, './src'); | |
| const MODULES_DIR = path.resolve(__dirname, './node_modules'); | |
| const package = require('./package.json'); | |
| module.exports = { |
| //// MyComponent/MyComponent.js | |
| const MyComponent = ({class, text, setText}) => ( | |
| <div | |
| className={class} | |
| onClick={setText} | |
| >{text}</div> | |
| ) | |
| export default MyComponent | |
| //// |
| const { compose, mapProps, withHandlers, lifecycle } = Recompose; | |
| const { observable, action } = mobx; | |
| const { inject, observer, Provider } = mobxReact; | |
| const { PropTypes } = React; | |
| // store | |
| // ============================ | |
| const counterStore = observable({ | |
| // for primitive values, wrap the value inside a observable, | |
| // or wrap it in an plain js object |
| export default (fn, ...args) => (e) => { | |
| e.preventDefault(); | |
| fn(...args); | |
| }; |