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
| <?php | |
| /* | |
| //////////////////////////////////////////////////////////// | |
| ////// | |
| ////// Abstracted code for quickly adding custom post types | |
| ////// include this file in functions.php, then add custom post types like so: | |
| ////// | |
| //////////////////////////////////////////////////////////// |
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 WrapperComponent extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.refHandler = this.refHandler.bind(this); | |
| } | |
| refHandler(c) { | |
| this.instance = c.getWrappedInstance(); | |
| } |
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 typeToReducer from 'type-to-reducer'; | |
| import { | |
| ActionConst, | |
| } from 'react-native-router-flux'; | |
| const initialState = { | |
| scene: { | |
| name: 'Games Overview', | |
| key: 'Games Overview', | |
| title: 'Games Overview', |
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 WrapperComponent extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| handledMounted: false, | |
| appState: null, | |
| }; | |
| this.refHandler = this.refHandler.bind(this); | |
| this.handleAppStateChange = this.handleAppStateChange.bind(this); | |
| this.componentWillAppear = this.componentWillAppear.bind(this); |
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 WrapperComponent extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| handledMounted: false, | |
| }; | |
| this.refHandler = this.refHandler.bind(this); | |
| this.componentWillAppear = this.componentWillAppear.bind(this); | |
| } |
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 WrapperComponent extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| handledMounted: false, | |
| }; | |
| this.refHandler = this.refHandler.bind(this); | |
| this.componentWillAppear = this.componentWillAppear.bind(this); | |
| } |
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, { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| function getWrappedComponent( | |
| component, | |
| [ | |
| mapStateToProps, | |
| mapDispatchToProps, | |
| mergeProps, | |
| options, |
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, { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| function getWrappedComponent( | |
| component, | |
| [ | |
| mapStateToProps, | |
| mapDispatchToProps, | |
| mergeProps, | |
| options, |
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 patchedConnect = (...args) => component => { | |
| const componentName = component.name; | |
| const mapStateToProps = ({ router }) => { | |
| const { | |
| scene, | |
| } = router; | |
| return { | |
| activeComponent: (scene || {}).title, |
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, { Component } from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { | |
| AppState, | |
| } from 'react-native'; | |
| function getWrappedComponent( | |
| component, | |
| [ | |
| mapStateToProps, |
OlderNewer