├── .gitignore
├── 01-reactivity
├── 1.1-getter-setter.js
└── 1.2-dependency-tracking.js
├── 02-render
├── 2.1-render-fn.html
├── 2.2-render-tags.html
└── 2.3-conditional-component.html
├── 03-state-management
├── 3.1-pass-props.html
├── 3.2-shared-object.html
├── 3.3-shared-instance.html
├── 3.4-mutations.html
└── 3.5-functional.html
├── 04-component-patterns
├── 4.1-higher-order.html
├── 4.2-abstract.html
├── 4.3-scoped-slots.html
└── 4.4-fetch.html
├── README.md
└── styles.css
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional eslint cache
46 | .eslintcache
47 |
48 | # Optional REPL history
49 | .node_repl_history
50 |
51 | # Output of 'npm pack'
52 | *.tgz
53 |
54 | # Yarn Integrity file
55 | .yarn-integrity
56 |
57 | # dotenv environment variables file
58 | .env
59 |
60 | # next.js build output
61 | .next
62 |
--------------------------------------------------------------------------------
/01-reactivity/1.1-getter-setter.js:
--------------------------------------------------------------------------------
1 | function observe(obj) {
2 | // define property for each key
3 | Object.keys(obj).forEach(key => {
4 | let internalValue = obj[key];
5 | Object.defineProperty(obj, key, {
6 | get() {
7 | console.log(key, 'is:', internalValue);
8 | return internalValue;
9 | },
10 | set(value) {
11 | internalValue = value;
12 | console.log('setting', key, 'to:', internalValue);
13 | }
14 | });
15 | });
16 | }
17 |
18 | const obj = {
19 | number: 42
20 | };
21 |
22 | observe(obj);
23 |
24 | obj.number; // should log: '"number" is: 123'
25 | obj.number = 13; // should log: 'setting "number" to: 234'
26 | obj.number; // should log: '"number" is: 234'
27 |
--------------------------------------------------------------------------------
/01-reactivity/1.2-dependency-tracking.js:
--------------------------------------------------------------------------------
1 | function observe(obj) {
2 | // define property for each key
3 | Object.keys(obj).forEach(key => {
4 | let internalValue = obj[key];
5 | const dep = new Dep();
6 | Object.defineProperty(obj, key, {
7 | get() {
8 | console.log(key, 'is:', internalValue);
9 | dep.depend();
10 | return internalValue;
11 | },
12 | set(value) {
13 | internalValue = value;
14 | console.log('setting', key, 'to:', internalValue);
15 | dep.notify();
16 | }
17 | });
18 | });
19 | }
20 |
21 | class Dep {
22 | constructor() {
23 | this.observers = [];
24 | }
25 | depend() {
26 | if(externalUpdate) {
27 | this.observers.push(externalUpdate);
28 | }
29 | }
30 | notify() {
31 | this.observers.forEach(obs => obs());
32 | }
33 | }
34 |
35 | let externalUpdate;
36 | function autorun(update) {
37 | let externalUpdate = update;
38 | update();
39 | }
40 |
41 | const state = {
42 | count: 0
43 | };
44 |
45 | observe(state);
46 |
47 | autorun(() => {
48 | console.log(state.count)
49 | });
50 | // should immediately log "count is: 0"
51 |
52 | state.count++;
53 | // should log "count is: 1"
54 |
--------------------------------------------------------------------------------
/02-render/2.1-render-fn.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
{{ msg }}
16 |
17 |
18 |
19 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/02-render/2.2-render-tags.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/02-render/2.3-conditional-component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/03-state-management/3.1-pass-props.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/03-state-management/3.2-shared-object.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/03-state-management/3.3-shared-instance.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/03-state-management/3.4-mutations.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/03-state-management/3.5-functional.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/04-component-patterns/4.1-higher-order.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/04-component-patterns/4.2-abstract.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/04-component-patterns/4.3-scoped-slots.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ item }}
13 | {{ msg }}
14 |
15 |
16 |
17 |
18 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/04-component-patterns/4.4-fetch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Please input your GitHub username
12 |
13 |
14 |
15 | Loading avatar for {{ username }}
16 |
17 |
![]()
18 |
19 |
20 |
21 | Loading organizations...
22 |
23 |
Organizations
24 |
User doesn't belong to any organizations.
25 |
26 |
27 |
28 |
29 | Loading details for {{ org.login }}...
30 |
31 |
32 | {{ org.login }} ({{ data.name || 'full name not set' }})
33 |
34 | {{ error }}
35 |
36 |
37 |
38 |
39 | {{ error }}
40 |
41 |
42 |
43 |
44 | {{ error }}
45 |
46 |
47 |
48 |
49 |
50 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## ARE YOU RECORDING?
2 |
3 | ---
4 |
5 |
6 | ## from the Ground Up
7 |
8 | Recap from full day workshop with Evan You at VueConf
9 |
10 | ---
11 |
12 | ## VueConf US
13 | ### New Orleans
14 |
15 | 
16 |
17 | ---
18 |
19 |
20 |
21 | ---
22 |
23 |
24 |
25 | ---
26 |
27 |
28 |
29 | ---
30 |
31 |
32 |
33 | ---
34 |
35 | ## Agenda
36 |
37 | * Reactivity - under the hood
38 | * Render cycle/virtual DOM overview
39 | * State Management Patterns
40 | * Component Patterns
41 | * Higher Order Components
42 | * Abstract Components
43 | * Scoped Slots
44 | * fetch component example
45 |
46 | ---
47 |
48 | # Reactivity
49 |
50 | ---
51 |
52 | ## Render Cycle/Virtual DOM Overview
53 |
54 | ---
55 |
56 | ## State Management Patterns
57 |
58 | ---
59 |
60 | ## Component Patterns
61 |
62 | ---
63 |
64 | # Best part of the workshop...
65 |
66 | ---
67 |
68 |
69 |
70 | ---
71 |
72 | #### I'm giving a lightning talk on the main stage Wednesday!!
73 | ##### OverVue of Vuetify.js
74 | 
75 |
76 | ---
77 |
78 | # Thanks!
79 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | img {
2 | background: none !important;
3 | border: none !important;
4 | box-shadow: none !important;
5 | width: auto !important;
6 | }
7 |
8 | .vue-logo {
9 | height: 200px;
10 | }
11 |
12 | code {
13 | font-size: 2em !important;
14 | line-height: 2em !important;
15 | }
16 |
--------------------------------------------------------------------------------