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
{ | |
name: 'ThrowStatement', | |
source: 'function x() {\n throw 5\n}', | |
range: { | |
location: 17, | |
length: 8 | |
}, | |
children: [{ | |
name: 'THROW', | |
source: 'function x() {\n throw 5\n}', |
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) 2014, 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. | |
*/ | |
'use strict'; | |
var FakeTimers = require('./lib/FakeTimers'); |
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
/** | |
* Batched updates test with Redux. You will need React 0.6.0 and a .babelrc: | |
{ | |
"whitelist": [ | |
"es6.parameters.default", | |
"es7.decorators" | |
] | |
} | |
*/ | |
'use strict'; |
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
{ | |
"name": "react-native", | |
"version": "0.6.0", | |
"dependencies": { | |
"absolute-path": { | |
"version": "0.0.0", | |
"from": "[email protected]", | |
"resolved": "https://registry.npmjs.org/absolute-path/-/absolute-path-0.0.0.tgz" | |
}, | |
"babel": { |
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
// Trying out a new syntax. It is: | |
// | |
// - not magical except for the DecoratedComponent bit | |
// - communicates that it returns props | |
// - ...that are computed from Redux data | |
// - resembles familiar functions like getInitialProps | |
// - nice aesthetically | |
@connect(data => X.DecoratedComponent.getDataProps(data)) | |
export default class X extends React.Component { |
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() {} | |
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
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
function getProfileRoute(user) { | |
return { | |
renderScene(navigator) { | |
let ProfileScreen = require('./ProfileScreen'); | |
return <ProfileScreen user={user} navigator={navigator} />; | |
}, | |
getTitle() { | |
return user.fullName; | |
}, |
OlderNewer