mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-08 09:12:05 +08:00
28 lines
393 B
JavaScript
28 lines
393 B
JavaScript
var React = require('react');
|
|
var Foo = require('Foo');
|
|
|
|
/**
|
|
* General component description.
|
|
*/
|
|
var Component = React.createClass({
|
|
propTypes: {
|
|
...Foo.propTypes,
|
|
/**
|
|
* Prop description
|
|
*/
|
|
bar: React.PropTypes.number
|
|
},
|
|
|
|
getDefaultProps: function() {
|
|
return {
|
|
bar: 21
|
|
};
|
|
},
|
|
|
|
render: function() {
|
|
// ...
|
|
}
|
|
});
|
|
|
|
module.exports = Component;
|