File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,6 @@ new Vue({
58
58
59
59
Vuex๋ ๊ณต์ ๋ ์ํ ๊ด๋ฆฌ๋ฅผ ์ฒ๋ฆฌํ๋ ๋ฐ ์ ์ฉํ์ง๋ง, ๊ฐ๋
์ ๋ํ ์ดํด์ ์์ํ๋ ๋น์ฉ๋ ํจ๊ป ๋ญ๋๋ค. ๊ทธ๊ฒ์ ๋จ๊ธฐ๊ฐ๊ณผ ์ฅ๊ธฐ๊ฐ ์์ฐ์ฑ ๊ฐ์ ๊ธฐํ๋น์ฉ์ด ์์ต๋๋ค.
60
60
61
- ๋๊ท๋ชจ SPA๋ฅผ ๊ตฌ์ถํ์ง ์๊ณ Vuex๋ก ๋ฐ๋ก ๋ฐ์ด ๋ค์๋ค๋ฉด, ์๊ฐ์ด ์ค๋ ๊ฑธ๋ฆฌ๊ณ ํ๋ ์ผ์ผ ๊ฒ์
๋๋ค. ์ด๊ฒ์ ์ผ๋ฐ ์ ์ธ ์ผ์
๋๋ค. ์ฑ์ด ๋จ์ํ๋ค๋ฉด Vuex์์ด๋ ๊ด์ฐฎ์ ๊ฒ์
๋๋ค. ๊ฐ๋จํ [ ๊ธ๋ก๋ฒ ์ด๋ฒคํธ ๋ฒ์ค] ( http://vuejs.org/guide/components.html#Non-Parent-Child-Communication ) ๋ง ์์ผ๋ฉด๋ฉ๋๋ค. ๊ทธ๋ฌ๋ ์ค๋ํ ๊ท๋ชจ์ SPA๋ฅผ ๊ตฌ์ถํ๋ ๊ฒฝ์ฐ Vue์ปดํฌ๋ํธ ์ธ๋ถ์ ์ํ๋ฅผ ๋ณด๋ค ์ ์ฒ๋ฆฌํ ์ ์๋ ๋ฐฉ๋ฒ์ ์๊ฐํ๊ฒ ๋ ๊ฐ๋ฅ์ฑ์ด ์์ผ๋ฉฐ Vuex๋ ์์ฐ์ค๋ฝ๊ฒ ์ ํํ ์ ์๋ ๋จ๊ณ๊ฐ ๋ ๊ฒ์
๋๋ค. Redux์ ์ ์์ธ Dan Abramov์ ์ข์ ์ธ์ฉ์ด ์์ต๋๋ค.
61
+ ๋๊ท๋ชจ SPA๋ฅผ ๊ตฌ์ถํ์ง ์๊ณ Vuex๋ก ๋ฐ๋ก ๋ฐ์ด ๋ค์๋ค๋ฉด, ์๊ฐ์ด ์ค๋ ๊ฑธ๋ฆฌ๊ณ ํ๋ ์ผ์ผ ๊ฒ์
๋๋ค. ์ด๊ฒ์ ์ผ๋ฐ ์ ์ธ ์ผ์
๋๋ค. ์ฑ์ด ๋จ์ํ๋ค๋ฉด Vuex์์ด๋ ๊ด์ฐฎ์ ๊ฒ์
๋๋ค. ๊ฐ๋จํ [ ๊ธ๋ก๋ฒ ์ด๋ฒคํธ ๋ฒ์ค] ( http://kr. vuejs.org/guide/components.html#Non-Parent-Child-Communication ) ๋ง ์์ผ๋ฉด๋ฉ๋๋ค. ๊ทธ๋ฌ๋ ์ค๋ํ ๊ท๋ชจ์ SPA๋ฅผ ๊ตฌ์ถํ๋ ๊ฒฝ์ฐ Vue์ปดํฌ๋ํธ ์ธ๋ถ์ ์ํ๋ฅผ ๋ณด๋ค ์ ์ฒ๋ฆฌํ ์ ์๋ ๋ฐฉ๋ฒ์ ์๊ฐํ๊ฒ ๋ ๊ฐ๋ฅ์ฑ์ด ์์ผ๋ฉฐ Vuex๋ ์์ฐ์ค๋ฝ๊ฒ ์ ํํ ์ ์๋ ๋จ๊ณ๊ฐ ๋ ๊ฒ์
๋๋ค. Redux์ ์ ์์ธ Dan Abramov์ ์ข์ ์ธ์ฉ์ด ์์ต๋๋ค.
62
62
63
63
> Flux ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์๊ฒฝ๊ณผ ๊ฐ์ต๋๋ค. ํ์ํ ๋ ์์๋ณผ ์ ์์ต๋๋ค.
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Vuex๋ **๋จ์ผ ์ํ ํธ๋ฆฌ** ๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ฆ, ์ด ๋จ์ผ ๊ฐ์ฒด๋
8
8
9
9
### Vuex ์ํ๋ฅผ Vue ์ปดํฌ๋ํธ์์ ๊ฐ์ ธ์ค๊ธฐ
10
10
11
- ๊ทธ๋ฌ๋ฉด Vue ์ปดํฌ๋ํธ์์ ์ ์ฅ์ ๋ด๋ถ์ ์ํ๋ฅผ ์ด๋ป๊ฒ ํ์ํ๋์? Vuex ์ ์ฅ์๋ ๋ฐ์์ ์ด๊ธฐ ๋๋ฌธ์ ์ ์ฅ์์์ ์ํ๋ฅผ "๊ฒ์"ํ๋ ๊ฐ์ฅ ๊ฐ๋จํ ๋ฐฉ๋ฒ์ [ ๊ณ์ฐ๋ ์์ฑ] ( http://vuejs.org/guide/computed.html ) ๋ด์์ ์ผ๋ถ ์ ์ฅ์ ์ํ๋ฅผ ๊ฐ์ ธ์ค๋ ๊ฒ์
๋๋ค.
11
+ ๊ทธ๋ฌ๋ฉด Vue ์ปดํฌ๋ํธ์์ ์ ์ฅ์ ๋ด๋ถ์ ์ํ๋ฅผ ์ด๋ป๊ฒ ํ์ํ๋์? Vuex ์ ์ฅ์๋ ๋ฐ์์ ์ด๊ธฐ ๋๋ฌธ์ ์ ์ฅ์์์ ์ํ๋ฅผ "๊ฒ์"ํ๋ ๊ฐ์ฅ ๊ฐ๋จํ ๋ฐฉ๋ฒ์ [ ๊ณ์ฐ๋ ์์ฑ] ( http://kr. vuejs.org/guide/computed.html ) ๋ด์์ ์ผ๋ถ ์ ์ฅ์ ์ํ๋ฅผ ๊ฐ์ ธ์ค๋ ๊ฒ์
๋๋ค.
12
12
13
13
``` js
14
14
// Counter ์ปดํฌ๋ํธ๋ฅผ ๋ง๋ญ๋๋ค
You canโt perform that action at this time.
0 commit comments