-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
193 lines (193 loc) · 4.68 KB
/
index.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html lang="en">
<head>
<title>Redux</title>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="shower/themes/ribbon/styles/screen-16x10.css">
</head>
<body class="shower list">
<header class="caption">
<h1>Redux</h1>
<p>Predictable, Modern, Incredible</p>
</header>
<section class="slide" id="cover">
<h2>Redux: predictable, modern, incredible</h2>
<p>
Źmicier Jaraševič
</p>
<style>
#cover {
background: url('pictures/redux-wtf.jpg') center no-repeat;
background-size: cover;
}
#cover h2 {
margin: 0;
color:#FADF1C;
text-align:center;
font-size:56px;
}
#cover p {
margin:250px 0 0;
text-align:center;
color:#FFF;
font-size:44px;
}
</style>
</section>
<section class="slide" id="history">
<h2>History</h2>
<ol>
<li>Vanilla</li>
<li>jQuery</li>
<li>MVC</li>
<li>React</li>
<li>Flux</li>
<li>Redux</li>
</ol>
<p class="note">Redux [ˈriːdʌks] adjective: brought back, revived</p>
<style>
#history {
background: #fff url('pictures/mvvc.jpg') right center no-repeat;
background-size: 70%;
}
</style>
</section>
<section class="slide" id="flux">
<h2>Flux</h2>
<img src="pictures/flux.png" style="width: 100%;" \>
</section>
<section class="slide" id="flux2">
<style>
#flux2 {
background: #fff url('pictures/flux2.jpg') center no-repeat;
background-size: 100%;
}
</style>
</section>
<section class="slide" id="flux3">
<style>
#flux3 {
background: #fff url('pictures/flux-diagram.png') center no-repeat;
background-size: auto 100%;
}
</style>
</section>
<section class="slide" id="dan">
<style>
#dan {
background: #fff url('pictures/dan.jpeg') center no-repeat;
background-size: contain;
}
</style>
</section>
<section class="slide" id="principles">
<h2>Three Principles</h2>
<ol>
<li>
<b>Single source of truth</b> store.getState()
<br/>
<span>The state of your whole application is stored in an object tree within a single store.</span>
</li>
<li>
<b>State is read-only</b> store.dispatch(action(data))
<br/>
<span>The only way to mutate the state is to emit an action, an object describing what happened.</span>
</li>
<li>
<b>Changes are made with pure functions</b> (state, action) => newState
<br/>
<span>To specify how the state tree is transformed by actions, you write pure reducers.</span>
</li>
</ol>
<style>
#principles li span {
font-size: 0.8em;
color: #666;
}
</style>
</section>
<section class="slide" id="parts">
<h2>Parts</h2>
<ol>
<li>Actions</li>
<li>Reducers</li>
<li>Store</li>
<li>Middleware</li>
<li>
React Redux
<ol>
<li>Presentational Components</li>
<li>Container Components</li>
<li>React Router</li>
</ol>
</li>
</ol>
<style>
#parts {
background: #fff url('pictures/flow.gif') right no-repeat;
background-size: 75%;
}
</style>
</section>
<section class="slide">
<h2>Dumb vs. Smart</h2>
<table>
<tr>
<th scope="col"></th>
<th>Component</th>
<th>Container</th>
</tr>
<tr>
<th scope="col">Purpose</th>
<td>How things look</td>
<td>How things work</td>
</tr>
<tr>
<th scope="row">Aware of Redux</th>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<th scope="row">To read data</th>
<td>From props</td>
<td>Redux state</td>
</tr>
<tr>
<th scope="row">To change data</th>
<td>Invoke callbacks from props</td>
<td>Dispatch Redux actions</td>
</tr>
</table>
</section>
<section class="slide" id="code">
<h2>Code sample</h2>
<img src="pictures/code.png" style="width:100%"/>
</section>
<section class="slide" id="redux-end">
<style>
#redux-end {
background: url('pictures/redux.jpg') center no-repeat;
background-size: cover;
}
</style>
<p style="position: absolute; right: 10%; top: 30%; z-index: 1; color: #fff;">
<img src="pictures/gmail.png" style="width: 36px;" />
</a>
<a href="http://github.com/zmeecer">
<img src="pictures/github.svg" style="width: 36px;" />
</a>
<a href="http://linkedin.com/in/zmeecer">
<img src="pictures/linkedin.png" style="width: 36px;" />
</a>
Źmicier Jaraševič
</p>
</section>
<div class="progress"></div>
<script src="shower/shower.min.js"></script>
<!-- Copyright © 2015 Yours Truly, Famous Inc. -->
<!-- Photos by John Carey, fiftyfootshadows.net -->
</body>
</html>