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
ide:react-native·master$ ./scripts/e2e-test.sh | |
> [email protected] install /Users/ide/.nvm/versions/node/v4.2.1/lib/node_modules/sinopia/node_modules/crypt3 | |
> node-gyp rebuild | |
CXX(target) Release/obj.target/crypt3/crypt3.o | |
In file included from ../crypt3.cc:7: | |
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal' | |
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) { | |
^ |
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
function getHomeRoute() { | |
return { | |
// Implement onWillFocus, onDidFocus, onWillBlur, or onDidBlur | |
onWillFocus(event) { | |
// The event is the one from React Native's Navigator. See the source code | |
// for what properties it has. | |
}, | |
}; | |
} |
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
function getProfileRoute(user) { | |
let emitter = new EventEmitter(); | |
return { | |
renderScene(navigator) { | |
let ProfileScreen = require('./ProfileScreen'); | |
return ( | |
<ProfileScreen | |
user={user} | |
navigator={navigator} | |
routeEvents={emitter} |
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
function getProfileRoute(user) { | |
return { | |
renderScene(navigator) { | |
let ProfileScreen = require('./ProfileScreen'); | |
return <ProfileScreen user={user} navigator={navigator} />; | |
}, | |
getTitle() { | |
return user.fullName; | |
}, |
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
let homeRoute = { | |
getSceneClass() { | |
return require('./HomeScreen'); | |
}, | |
getTitle() { | |
return 'Home', | |
}, | |
renderLeftButton(navigator) { |
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
{ | |
"parser": "babel-eslint", | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"env": { | |
"es6": true, | |
"jasmine": true, |
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
// @connect is a decorator provided by Redux that returns a new class that wraps | |
// the one defined below. Somewhat unintuitively but understandably, "Example" | |
// refers to the wrapper component returned from the decorator, not the wrapped | |
// component defined below. | |
@connect(data => ({ })) | |
class Example extends React.Component { | |
static staticMethod() {} | |
instanceMethod() {} | |