forked from a2call/react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): React.PureComponent generators (react-boilerplate#811)
* feat(react): use React.PureComponent in demo app * feat(internals): generator support for PureComponent * chore(eslint): add missing eslint-disable on HomePage * Update appveyor.yml * Update appveyor.yml
- Loading branch information
1 parent
a37c3e6
commit f719214
Showing
12 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* | ||
* {{ properCase name }} | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
{{#if wantMessages}} | ||
import { FormattedMessage } from 'react-intl'; | ||
import messages from './messages'; | ||
{{/if}} | ||
{{#if wantCSS}} | ||
import styles from './styles.css'; | ||
{{/if}} | ||
|
||
class {{ properCase name }} extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function | ||
render() { | ||
return ( | ||
{{#if wantCSS}} | ||
<div className={{curly true}}styles.{{ camelCase name }}{{curly}}> | ||
{{else}} | ||
<div> | ||
{{/if}} | ||
{{#if wantMessages}} | ||
<FormattedMessage {...messages.header} /> | ||
{{/if}} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default {{ properCase name }}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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