UNPKG

1.83 kBtext/x-handlebars-templateView Raw
1/**
2 * React component for {{spinalcase name}}.
3 * @class {{pascalcase name}}
4 *
5 * Generated by {{generator}} on {{today}},
6 * from a template provided by {{pkg.name}}.
7 *
8 * @see https://facebook.github.io/react/
9 */
10
11"use strict";
12
13import React, {PropTypes as types} from 'react';
14import classnames from 'classnames';
15import {ApLocaleMixin} from 'apeman-react-mixins';
16import defineDebug from 'debug';
17
18import mixins from '{{base}}/../mixins';
19
20const debug = defineDebug('project:react:{{spinalcase name}}');
21
22/** @lends {{pascalcase name}} */
23let {{pascalcase name}} = React.createClass({
24
25 //--------------------
26 // Specs
27 //--------------------
28
29 propTypes: {
30 },
31
32 mixins: [
33 ApLocaleMixin
34 ],
35
36 statics: {},
37
38 getInitialState() {
39 return {};
40 },
41
42 getDefaultProps() {
43 return {}
44 },
45
46 render() {
47 let s = this;
48 let {state, props} = s;
49
50 let l = s.getLocale();
51
52 return (
53 <div className={classnames('{{spinalcase name}}', props.className)}>
54
55 </div>
56 );
57 },
58
59 //--------------------
60 // Lifecycle
61 //--------------------
62
63 componentWillMount() {
64 let s = this;
65 },
66
67 componentDidMount() {
68 let s = this;
69 },
70
71 componentWillReceiveProps(nextProps) {
72 let s = this;
73 },
74
75 shouldComponentUpdate(nextProps, nextState) {
76 let s = this;
77 return true;
78 },
79
80 componentWillUpdate(nextProps, nextState) {
81 let s = this;
82 },
83
84 componentDidUpdate(prevProps, prevState) {
85 let s = this;
86 },
87
88 componentWillUnmount() {
89 let s = this;
90 }
91
92 //------------------
93 // Custom
94 //------------------
95
96 //------------------
97 // Private
98 //------------------
99});
100
101export default {{pascalcase name}};
102
\No newline at end of file