1 | /**
|
2 | * React component for {{spinalcase name}} view.
|
3 | * @class {{pascalcase name}}View
|
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 |
|
13 | import React, {PropTypes as types} from 'react';
|
14 | import classnames from 'classnames';
|
15 | import {ApView, ApViewHeader, ApViewBody} from 'apeman-react-basic';
|
16 | import {ApLocaleMixin, ApViewMixin, ApSpinMixin, ApToastMixin} from 'apeman-react-mixins';
|
17 | import defineDebug from 'debug';
|
18 |
|
19 | import fragments from '{{base}}/fragments';
|
20 | import mixins from '{{base}}/../mixins';
|
21 | import services from '{{base}}/../services';
|
22 |
|
23 | const debug = defineDebug('project:react:{{spinalcase name}}');
|
24 |
|
25 | /** @lends {{pascalcase name}}View */
|
26 | let {{pascalcase name}}View = React.createClass({
|
27 |
|
28 | //--------------------
|
29 | // Specs
|
30 | //--------------------
|
31 |
|
32 | propTypes: {},
|
33 |
|
34 | mixins: [
|
35 | ApLocaleMixin,
|
36 | ApViewMixin,
|
37 | ApSpinMixin,
|
38 | ApToastMixin
|
39 | ],
|
40 |
|
41 | statics: {
|
42 | viewName: '{{spinalcase name}}'
|
43 | },
|
44 |
|
45 | getInitialState() {
|
46 | return {};
|
47 | },
|
48 |
|
49 | getDefaultProps() {
|
50 | return {};
|
51 | },
|
52 |
|
53 | render() {
|
54 | let s = this;
|
55 | let {state, props} = s;
|
56 |
|
57 | let l = s.getLocale();
|
58 |
|
59 | return (
|
60 | <ApView className={classnames('{{spinalcase name}}-view', props.className)}>
|
61 | <ApViewHeader leftText={null}
|
62 | leftIcon={ApViewHeader.popIcon(props.viewWay)}
|
63 | onLeftTap={s.popThisViewFromCurrentStack}
|
64 | titleText={null}
|
65 | titleIcon={null}
|
66 | rightText={null}
|
67 | rightIcon={null}
|
68 | onRightTap={null}
|
69 | />
|
70 | <ApViewBody>
|
71 | This is {{spinalcase name}} view.
|
72 | </ApViewBody>
|
73 | </ApView>
|
74 | );
|
75 | },
|
76 |
|
77 | //--------------------
|
78 | // Lifecycle
|
79 | //--------------------
|
80 |
|
81 | componentWillMount() {
|
82 | let s = this;
|
83 | },
|
84 |
|
85 | componentDidMount() {
|
86 | let s = this;
|
87 | },
|
88 |
|
89 | componentWillReceiveProps(nextProps) {
|
90 | let s = this;
|
91 | },
|
92 |
|
93 | shouldComponentUpdate(nextProps, nextState) {
|
94 | let s = this;
|
95 | return true;
|
96 | },
|
97 |
|
98 | componentWillUpdate(nextProps, nextState) {
|
99 | let s = this;
|
100 | },
|
101 |
|
102 | componentDidUpdate(prevProps, prevState) {
|
103 | let s = this;
|
104 | },
|
105 |
|
106 | componentWillUnmount() {
|
107 | let s = this;
|
108 | }
|
109 |
|
110 | //------------------
|
111 | // Custom
|
112 | //------------------
|
113 |
|
114 | //------------------
|
115 | // Private
|
116 | //------------------
|
117 | });
|
118 |
|
119 | export default {{pascalcase name}}View;
|
120 |
|
\ | No newline at end of file |