mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Add some stuff that requires transpilation. (#4174)
This commit is contained in:
committed by
Joe Haddad
parent
06dd17e21b
commit
9c167a4249
@@ -1,5 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
const Comp1 = () => <div>Comp1</div>;
|
||||
class Comp1 extends React.Component {
|
||||
static parts = {
|
||||
greeting: 'hello',
|
||||
region: 'world',
|
||||
};
|
||||
|
||||
render() {
|
||||
const { greeting, region } = Comp1.parts;
|
||||
|
||||
return (
|
||||
<div {...this.props}>
|
||||
Comp1
|
||||
{greeting} {region}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Comp1;
|
||||
|
||||
Reference in New Issue
Block a user