๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

vanila5

[Vanila js] ์ตœ๊ทผ ๊ฒ€์ƒ‰ ๊ตฌํ˜„ํ•˜๊ธฐ ResultViewexport default class HistoryListView extends KeywordListView { constructor() { super(qs("#history-list-view"), new Template()); } bindEvents() {} handleClickRemoveButton() {}} HistoryListView๋ฅผ ๋ณด๋ฉด KeywordListView ์™€ ๋งค์šฐ ์œ ์‚ฌํ•˜๋‹ค.์ถ”์ฒœ๊ฒ€์ƒ‰๊ณผ ์ฐจ๋ณ„์ ์„ ์ƒ๊ฐํ•˜๋ฉด, ๊ฒ€์ƒ‰๊ธฐ๋ก์„ ์ง€์šฐ๋Š” ์ž‘์—…์ด ์ถ”๊ฐ€๋กœ ์ˆ˜ํ–‰๋˜๋‹ˆ๊นŒ. ์ƒˆ๋กœ์šด ์ด๋ฒคํŠธ๋ฅผ ๋ฐ”์ธ๋”ฉ ํ•ด์ค€๋‹ค.๋˜, KeywordListView๋ฅผ ์ƒ์†๋ฐ›์œผ๋ฏ€๋กœ KeywordListView์˜ ์ƒ์„ฑ์ž์˜ ๊ตฌ์กฐ ๋ณ€๊ฒฝ์ด ๋ฐœ์ƒํ•œ๋‹ค.Controllerexport defaul.. 2024. 8. 2.
[Vanila js] ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ๊ธฐ๋Šฅ ๊ตฌํ˜„ Viewexport default class SearchResultView extends View { constructor() { super(qs("#search-result-view")); this.template = new Template(); } show(data = []) { if (data.length > 0) { this.element.innerHTML = this.template.getList(data); } else { this.element.innerHTML = this. template.getEmptyMessage(); } super.show(); }}.. 2024. 7. 31.
[Vanila js] ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ Branch - ready/search-form-1์•ž์„  ํฌ์ŠคํŒ…์˜ ์ž‘์—…์ด ์ œ๋Œ€๋กœ ๋˜์—ˆ๋‹ค๋ฉด main ๋ธŒ๋žœ์น˜์—์„œ1. git checkout -b ready/search-form-12. ์ฝ”๋“œ ์ž‘์„ฑ3. git add .4. git commit -m "feat: ๋‚ด์šฉ"5. git push origin ready/search-form-1์ดํ›„ PR ๋‚ ๋ฆฌ๊ณ  Rebase Merge ํ•˜๊ธฐ.git bash์—์„œ ์ฝ”๋“œ๋กœ ํ•  ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ํ˜‘์—… ์ค‘ ์ฝ”๋“œ ๋ฆฌ๋ทฐ๋ฅผ ํ•˜๋Š” ๊ณผ์ •์ด ์žˆ์Œ.๊ทธ๋ž˜์„œ ์ง์ ‘ github ์‚ฌ์ดํŠธ์—์„œ Mergeํ•˜๋Š” ๊ฒƒ์— ์ต์ˆ™ํ•ด์ง€๊ธฐ ์•ž์œผ๋กœ ๋ชจ๋“  ์ž‘์—…์€ ์œ„ ๊ณผ์ •์„ ๋ฐ˜๋ณตํ•ด์„œ branch๋ฅผ ์—…๋ฐ์ดํŠธ ํ•  ์˜ˆ์ •  // index.html // main.jsdocument.addEventListener("DOMContentL.. 2024. 7. 31.
[Vanila.js] ์‚ฌ์ „ ์ฝ”๋“œ ์ดํ•ดํ•˜๊ธฐ ๊ฐ•์‚ฌ๋‹˜์ด ๋ฏธ๋ฆฌ ๊ตฌํ˜„ํ•ด ๋‘” ์„œ๋น„์Šค branch : ready/scaffodingIn Memory DB์ถ”์ฒœ ๊ฒ€์ƒ‰์–ด, ๊ฒ€์ƒ‰ ๊ธฐ๋ก, ์ƒํ’ˆ ๋ฐ์ดํ„ฐUtility์‹œ๊ฐ„๊ด€๋ จ UtilDOM Event๋ฅผ ํ™œ์šฉํ•œ Util๊ธฐ๋ณธ์ ์œผ๋กœ JS์—์„œ ์ œ๊ณตํ•˜๋Š” ๊ธฐ์ˆ ๋“ค์„ ๋ชจ๋“ˆํ™”ํ–ˆ๋‹ค๊ณ  ๋ณด์ธ๋‹ค.Model์ดํ›„์— ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง ๋ฐ ์ค‘์š” ๋กœ์ง์ด ๋‹ด๊ธธ ๊ฒƒ์œผ๋กœ ๋ณด์ž„.View์ •์  ํŽ˜์ด์ง€ ์ •๋ณด๋ฅผ ๋ Œ๋”๋ง(์ˆ˜์ •)ํ•˜๋Š” ํŽ˜์ด์ง€Utility๋ฅผ ํ™œ์šฉํ•ด ๊ธฐ๋ณธ์ ์ธ ๊ธฐ๋Šฅ์ด ์ œ๊ณต๋œ๋‹ค.ControllerView์— ์ž‘์„ฑ๋  ๋‚ด์šฉ์„ ์ œ์–ดModel์˜ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ํ™œ์šฉํ•˜๊ฑฐ๋‚˜ ๋”ฐ๋กœ ์„œ๋น„์Šค ๋กœ์ง์„ ์ž‘์„ฑํ•  ๋“ฏ 2024. 7. 31.
[Vanila.js] ํ™˜๊ฒฝ์…‹ํŒ… 1 ์šฐ์•„ํ•œ ํ˜•์ œ๋“ค์—์„œ ๊ทผ๋ฌด ์ค‘์ด์‹  ํ”„๋ก ํŠธ ๊ฐœ๋ฐœ์ž ๊น€์ •ํ™˜๋‹˜์˜ ๊ฐ•์˜๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.์ธํ”„๋Ÿฐ ๊ฐ•์˜ ์ œ๋ชฉ์€ '๋งŒ๋“ค๊ณ  ๋น„๊ตํ•˜๋ฉฐ ํ•™์Šตํ•˜๋Š” ๋ฆฌ์•กํŠธ'์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ๊ฐ•์˜๋Š” ๊นƒ์„ ์‚ฌ์šฉํ•˜๋ฉฐ Branch๋ณ„๋กœ ๊ฐ•์˜๋ฅผ ํ•ด์ฃผ์‹ญ๋‹ˆ๋‹ค. ํ•™์Šต์„ ํ•˜๊ธฐ ์œ„ํ•ด ๋จผ์ € git์„ forkํ•ฉ๋‹ˆ๋‹ค. fork๊ฐ€ ์ž˜๋˜์—ˆ๋‹ค๋ฉด, ๊ฐ•์‚ฌ๋‹˜์ด ๋งŒ๋“ค์–ด ๋‘” branch๋กœ ์ด๋™ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.์šฐ์„  forkํ•œ ๋‚ด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ cloneํ•˜๊ณ  ํ•ด๋‹น ํด๋”๋กœ ์ด๋™ํ•ด์„œ git bash๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.๊ทธ๋ฆฌ๊ณ  ์•„๋ž˜์™€ ๊ฐ™์€ ๋ช…๋ น์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. 1. git remote add upstream https://github.com/jeonghwan-kim/lecture-react.git2. git fetch upstream3. git checkout -f upstream/ready/scaf.. 2024. 7. 30.