-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
51 lines (40 loc) · 2.24 KB
/
index.js
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
51
import React from 'react';
import ReactDOM from 'react-dom';
import './css/index.css';
import App from './App';
import MyData from './tutorial/myData';
import ExampleData from './tutorial/exampleData';
import Button from './tutorial/defaultProps';
// state testing
import MoodToggle from './tutorial/state/MoodToggle';
import ColorToggle from './tutorial/state/ColorToggle';
import Parent from './tutorial/state/Parent';
import ButtonParentClass from './tutorial/state/ButtonParentClass';
import SelectParentClass from './tutorial/state/SelectParentClass';
import StyleMe from './tutorial/style/StyleMe';
import Home from './tutorial/style/Home';
import GuineaPigsContainer from './tutorial/soc/containers/GuineaPigsContainer';
import BookList from './tutorial/proptypes/BookList';
import Input from './tutorial/forms/Input';
import EnthusedApp from './tutorial/lifecycle/updating/App';
import FetchExample from './tutorial/FetchExample';
import registerServiceWorker from './registerServiceWorker';
const rootDiv = document.getElementById('root');
ReactDOM.render(<App />, rootDiv);
const dataContainer = document.getElementById('example-data');
ReactDOM.render(<ExampleData headings={MyData.headingData} dataSet={MyData.rowData}/>, dataContainer);
Button.defaultProps = {text: 'I am a button'};
ReactDOM.render(<Button />, document.getElementById('testing'));
ReactDOM.render(<MoodToggle />, document.getElementById('state-mood'));
ReactDOM.render(<ColorToggle />, document.getElementById('state-toggle-color'));
ReactDOM.render(<Parent />, document.getElementById('child-parent-state'));
ReactDOM.render(<ButtonParentClass />, document.getElementById('child-parent-button'));
ReactDOM.render(<SelectParentClass />, document.getElementById('child-parent-select'));
ReactDOM.render(<StyleMe/>, document.getElementById('styling'));
ReactDOM.render(<Home />, document.getElementById('home-style'));
ReactDOM.render(<GuineaPigsContainer />, document.getElementById('guinea-pigs'));
ReactDOM.render(<BookList />, document.getElementById('book-list'));
ReactDOM.render(<Input/>, document.getElementById('react-forms'));
ReactDOM.render(<EnthusedApp/>, document.getElementById('enthused'));
ReactDOM.render(<FetchExample/>, document.getElementById('fetch-example'));
registerServiceWorker();