-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsx
50 lines (41 loc) · 864 Bytes
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* dependencies
*/
import React, { Component } from "react";
import { appContext } from "context/app-context";
import { ReactComponent as mySVG } from "assets/svg/my-svg.svg";
class App extends Component {
constructor(props) {
super(props);
this.state = {};
/**
* binded funcs
*/
// this.firstFunction = this.firstFunction.bind(this)
}
/**
* lifecycle
*/
/**
* funcs
*/
/**
* React Render
*/
render() {
/**
* classNames
*/
const _root = "app";
const _header = `${_root}-header`;
/**
* render functions
*/
const main = (context) => <div className={_root}>{header()}</div>;
const header = () => <div className={_header}></div>;
return (
<appContext.Consumer>{(context) => main(context)}</appContext.Consumer>
);
}
}
export default App;