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
| import React from 'react' | |
| import { connect } from 'react-redux' | |
| const TestComponent = ({ | |
| text, | |
| }) => ( | |
| <div> | |
| {text} | |
| </div> | |
| ) |
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
| import PropTypes from 'prop-types' | |
| import { connect } from 'react-redux' | |
| export const ReduxConnect = ({ | |
| mapDispatchToProps, | |
| mapStateToProps, | |
| render, | |
| }) => ( | |
| connect( | |
| (mapStateToProps || null), |
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
| import React, { PureComponent } from 'react' | |
| import { Match, Miss, Redirect } from 'react-router' | |
| export default class Routes extends PureComponent { | |
| constructor() { | |
| super() | |
| this.views = {} | |
| } |
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
| import React, { PureComponent } from 'react' | |
| import { Match, Miss, Redirect } from 'react-router' | |
| const isAsyncCapable = typeof window !== 'undefined' | |
| export default class Routes extends PureComponent { | |
| constructor() { | |
| super() | |
| this.views = {} |
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
| import { | |
| BUTTON_DOWN, | |
| BUTTON_UP, | |
| holdPressAction, | |
| singlePressAction, | |
| } from './actions' | |
| const timeLimit = 300 | |
| let startTime = Date.now() |
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
| import { | |
| BUTTON_DOWN, | |
| BUTTON_UP, | |
| doublePressAction, | |
| holdPressAction, | |
| singlePressAction, | |
| } from './actions' | |
| const timeLimit = 300 |
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
| import { | |
| BUTTON_DOWN, | |
| singlePressAction, | |
| } from './actions' | |
| const createButtonObserver = bluetoothAddress => observer => ( | |
| new FlicConnectionChannel(bluetoothAddress) | |
| .on( | |
| 'buttonUpOrDown', | |
| buttonPressState => observer.next(buttonPressState) |
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
| import { | |
| BUTTON_UP, | |
| doButtonPressAction, | |
| } from './actions' | |
| const createButtonObserver = bluetoothAddress => observer => ( | |
| new FlicConnectionChannel(bluetoothAddress) | |
| .on( | |
| 'buttonUpOrDown', | |
| buttonPressState => observer.next(buttonPressState) |
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
| import { | |
| BUTTON_DOWN, | |
| BUTTON_UP, | |
| doButtonPressAction, | |
| } from './actions' | |
| const timeLimit = 300 | |
| let timeoutId = 0 |
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
| import { | |
| BUTTON_DOWN, | |
| doublePressAction, | |
| singlePressAction, | |
| } from './actions' | |
| const timeLimit = 300 | |
| let startTime = Date.now() | |
| let timeoutId = 0 |
OlderNewer