adb shell input keyevent 0
KEYCODE_UNKNOWNI
C
| import React from 'react' | |
| import {render} from 'react-dom' | |
| import {Chart} from 'react-google-charts' | |
| class App extends React.Component{ | |
| constructor(props) { | |
| super(props); | |
| } | |
| onSelectEvent(Chart) { | |
| console.log(Chart.chart.getSelection()); |
| import React from 'react' | |
| import {render} from 'react-dom' | |
| import {Chart} from 'react-google-charts' | |
| export default class App extends React.Component { | |
| constructor(props) { | |
| super(props) | |
| this.state = { | |
| data: [], |
| "devDependencies": { | |
| "babel-eslint": "^6.1.2", | |
| "eslint": "^3.6.1", | |
| "eslint-config-airbnb": "^12.0.0", | |
| "eslint-plugin-babel": "^3.3.0", | |
| "eslint-plugin-import": "^1.16.0", | |
| "eslint-plugin-jsx-a11y": "^2.2.2", | |
| "eslint-plugin-react": "^6.3.0" | |
| } |
| { | |
| "parser": "babel-eslint", | |
| "env": { | |
| "browser": true, | |
| "node": true | |
| }, | |
| "extends": "airbnb", | |
| "rules": { | |
| "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], | |
| "import/prefer-default-export": "off", |
| # Your snippets | |
| # | |
| # Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
| # expand the prefix into a larger code block with templated values. | |
| # | |
| # You can create a new snippet in this file by typing "snip" and then hitting | |
| # tab. | |
| # | |
| # An example CoffeeScript snippet to expand log to console.log: | |
| # |
| ( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"; ) | |
| yarn add babel-eslint | |
| echo "{ | |
| \"parser\": \"babel-eslint\", | |
| \"env\": { | |
| \"browser\": true, | |
| \"node\": true, | |
| \"jest\": true, | |
| }, | |
| \"extends\": \"airbnb\", |
| yarn add -D jest babel-jest babel-preset-es2015 babel-preset-react react-test-renderer | |
| #Edit package.json adding the jest command : | |
| "scripts": { | |
| "build": "nwb build-react-component", | |
| "clean": "nwb clean-module && npm clean-demo", | |
| "start": "nwb serve-react-demo", | |
| "test": "nwb test", | |
| "test:coverage": "nwb test --coverage", | |
| "test:watch": "nwb test --server", | |
| "test:jest": "jest" |
| const photoshoot = (...args) => { | |
| args.forEach(arg => | |
| expect(arg).toMatchSnapshot() | |
| ); | |
| }; |
| import { reaction, observable, runInAction } from 'mobx'; | |
| const myObservableMap = observable.map({}); | |
| const disposeReaction = reaction(() => myObservableMap, (newObservableValue) => { | |
| console.warn('Someone changed the observable map. new value : ', newObservableValue); | |
| }) | |
| myObservableMap.set('some', {data: 'of any type'}) | |
| myObservableMap.set('someOther', 'data') |