Download and install version 4.01 for windows: http://www.ocamlpro.com/pub/ocpwin/ocpwin-builds/ocpwin64/20160113/ocpwin64-20160113-4.01.0+ocp1-full-mingw64.exe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Input extends Component { | |
| constructor() { | |
| this.state = { | |
| value: 0, | |
| isValid: true, | |
| }; | |
| } | |
| changeHandler = (event) => { | |
| // do stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| handleKeyDown(e) { | |
| if (!e.ctrlKey) { | |
| return; | |
| } | |
| e.preventDefault(); | |
| const key = event.keyCode || event.which; | |
| const char = String.fromCharCode(key); | |
| switch (char.toUpperCase()) { | |
| case this.props.toggleVisibilityKey.toUpperCase(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var path = require('path'); | |
| var webpack = require('webpack'); | |
| var BundleTracker = require('webpack-bundle-tracker'); | |
| var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| module.exports = { | |
| entry: [ | |
| './app/index.js' | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const types = { | |
| ADD_TODO: 'ADD_TODO', | |
| DELETE_TODO: 'DELETE_TODO', | |
| COMPLETE_TODO: 'COMPLETE_TODO', | |
| }; | |
| const socketEvents = { | |
| ADD_TODO_SUCCESS: 'ADD_TODO_SUCCESS', | |
| ADD_TODO_FAIL: 'ADD_TODO_FAIL', | |
| }; |