Skip to content

Instantly share code, notes, and snippets.

@WaKeMaTTa
Created January 12, 2016 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaKeMaTTa/447eb494da3f46703a11 to your computer and use it in GitHub Desktop.
Save WaKeMaTTa/447eb494da3f46703a11 to your computer and use it in GitHub Desktop.
Which syntax is more better to use?
class MoviesApp extends Component {
render() {
var initialRoute = {name: 'search'};
return (
<Navigator
style={styles.container}
initialRoute={initialRoute}
configureScene={() => Navigator.SceneConfigs.FadeAndroid}
renderScene={RouteMapper}
/>
);
}
}
var MoviesApp = React.createClass({
render: function() {
var initialRoute = {name: 'search'};
return (
<Navigator
style={styles.container}
initialRoute={initialRoute}
configureScene={() => Navigator.SceneConfigs.FadeAndroid}
renderScene={RouteMapper}
/>
);
}
});
@WaKeMaTTa
Copy link
Author

I found more examples whitten in syntax-type-2.jsx but i like more syntax-type-1.jsx.

Which syntax is more better to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment