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 "RCTEventDispatcher.h" | |
#import "RCTRootView.h" | |
// somewhere in application:didFinishLaunchingWithOptions:( | |
self.bridge = rootView.bridge; | |
// sometime later | |
[self.bridge.eventDispatcher sendAppEventWithName:@"backgroundPositionResponse" body:JSON]; |
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
if (typeof self === 'object') persistStore(store) |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, |
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
POST v1/jobs | |
{ | |
position, | |
venueId, // string or null | |
venue, // object or null -> if object create a new venue record and save the resultant venueId to the new job | |
// ... other job data | |
} | |
OR |
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
/** | |
* Copyright (c) 2015, Facebook, Inc. All rights reserved. | |
* | |
* Facebook, Inc. ("Facebook") owns all right, title and interest, including | |
* all intellectual property and other proprietary rights, in and to the React | |
* Native CustomComponents software (the "Software"). Subject to your | |
* compliance with these terms, you are hereby granted a non-exclusive, | |
* worldwide, royalty-free copyright license to (1) use and copy the Software; | |
* and (2) reproduce and distribute the Software as part of your own software | |
* ("Your Software"). Facebook reserves all rights not expressly granted to |
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 _ = require('lodash') | |
var p = _.partial(console.log, 'abc') |
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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "RCTDefines.h" |
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
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation | |
moduleName:@"ios" | |
initialProperties:nil | |
launchOptions:launchOptions]; |
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
# 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. | |
{ | |
".source.js": | |
"Common Actions: require lodash": | |
prefix: "lodash" | |
body: "import _ from 'lodash'" |
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
// side effects are created by reducer, but executed by store | |
function reducer(state, action, createSideEffect){ | |
if(action.type === 'SUBMIT_DATA'){ | |
createSideEffect(({action, getState, dispatch}) => { | |
//.. do work | |
}) | |
} | |
} |