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 App = () => ( | |
| <SomeOuterComponent title='This is a Title'> | |
| <SomeChildComponent /> | |
| </SomeOuterComponent> | |
| ) |
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 SomeOuterComponent = ({ title, children }) => ( | |
| <div className="some_outer_class"> | |
| <h1>{title}</h1> | |
| {children} | |
| </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
| const frontPage = async (req, res) => { | |
| try { | |
| const feed = await fetchFeed({ sources }) | |
| const response = await sortFeed({ feed }) | |
| res(response) | |
| } catch (err) { | |
| console.log(`Error: controllers.feed: ${err}`) | |
| res(Boom.internal(err)) | |
| } | |
| } |
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 f = x => x * 2 | |
| const g = x => x + 10 | |
| g(f(f(10))) // 50 |
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 f = x => x * 2 | |
| const g = x => x + 10 | |
| g(f(10)) // 30 |
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 * as app from '../../../app'; | |
| import defaults from './preloader.json'; | |
| /** | |
| * Preloader | |
| * | |
| * @access public | |
| * | |
| * @param {(String|HTMLElement|NodeList)} els | |
| * @param {Object} custom |
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 * as app from '../../../app'; | |
| import defaults from './preloader.json'; | |
| /** | |
| * Preloader | |
| * | |
| * @access public | |
| * | |
| * @param {(String|HTMLElement|NodeList)} els | |
| * @param {Object} custom |
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
| export default class BarcodeCaptureView extends Component { | |
| constructor () { | |
| super() | |
| this.state = { | |
| captured: false | |
| } | |
| this._onBarCodeRead = this._onBarCodeRead.bind(this) | |
| this._onCancel = this._onCancel.bind(this) | |
| this.renderScanArea = this.renderScanArea.bind(this) | |
| StatusBar.setBarStyle('light-content') |
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 itemSelector = '[class*="tabs_item"]' | |
| const findParents = ({ initialElement }) => { | |
| let count = 0 | |
| let element = initialElement | |
| while (element.parentNode) { | |
| count++ | |
| element = element.parentNode | |
| } |
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 MyContainer extends Component { | |
| state = { | |
| itemA: 'something', | |
| itemB: 'another thing' | |
| } | |
| _onPress = () => { | |
| // ... | |
| } | |