2022-03 
๋งํฌ & ์ฝ์๊ฑฐ๋ฆฌ
State of JS 2021

์ง๋ 1๋ ๊ฐ Front-end ์์ญ์์์ ๋ณํ์ ์์ผ๋ก์ ์ ๋ง์ ์ดํด๋ณผ ์ ์๋ State of JS 2021 ๊ฒฐ๊ณผ๊ฐ ๋ฐํ๋์๋ค.
๊ธฐ์ ์ ๋ํ ์ ์ธ๊ณ์ ๊ฐ๋ฐ์๋ค์ ์ ํธ๋์ ๋ง์กฑ๋๋ฅผ ์ ๋ฆฌ๋ ์๋ฃ๋ฅผ ํตํด ์ฝ๊ฒ ์์๋ณผ ์ ์๋ค.
TL;DR
- ํ๋ ์์ํฌ: Angular์ ์ถฉ๊ฒฉ์ ์์์ Vue.js์ ํ๋ฝ์ธ
- ๋น๋ ๋๊ตฌ: Webpack์ ์ง์์ ํ๋ฝ์ธ์ Vite, esbuild, swc๋ก์ ์ธ๋๊ต์ฒด
- Back-end: Gastby๋ ์์์ ์ ์ผ ๋ง์ง๋ง์ ๋ญํน
- ๋ชจ๋ฐ์ผ & ๋ฐ์คํฌํฑ: Tauri์ ๋ฑ์ฅ
[์ฐธ๊ณ ] ๋น ๋ฅด๊ฒ ์ ์ฒด ์ค๋ฌธ ๊ฒฐ๊ณผ์ ๋ํ ์ธ์ฌ์ดํธ๋ฅผ ํ์ด ๋ณด๊ณ ์ถ๋ค๋ฉด, ๋ค์ ๋์์์ ์ฐธ๊ณ ํ๋ผ. The Shocking State of JavaScript // The Code Report
The Harsh Reality for JS Developers: If You Don't Study The Fundamentals You Will Be Just Another โCoderโ

์์ ์ด 15์๊ฐ ๋ด๋ด ์์ฑํ ์ฝ๋์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ ๊ณผ์ ์์ ๋ชจ๋๊ฐ ๋์ ์๊ฒฌ๊ณผ ๋ต๋ณ์ ๊ธฐ๋ค๋ฆฌ๋ ์ํฉ์์, ์์ฑํ ์ฝ๋๋ฅผ ์ค๋ช ํ ์ ์ ํ ๋จ์ด๋ฅผ ์ฐพ์ง ๋ชปํ๊ฑฐ๋ ๋๋ ๋งค์ผ ๋ค๋ฃจ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ/์ธ์ด(React Hooks, TypeScript ๋ฑ)๋ค์ด ์ค์ ๋ก ์ด๋ป๊ฒ ๋์ํ๋์ง ์ดํดํ์ง ๋ชปํ๊ณ ์๋ค๋ฉด, ์ค๋๋ ์ ์ํํธ์จ์ด ๊ฐ๋ฐ์๋ก์จ ์ฐ๋ผ๋ฆฐ ๋ค์์ ํ์ค์ ์ง๋ฉดํ๊ฒ ๋๋ค.
"๊ธฐ์ ์ ๋น ๋ฅธ ๋ฐ์ ์ ๋๋นํด, ์ฐ๋ฆฌ๋ ์๊ฐ๊ณผ์ ์ธ์์์ ์ง๊ณ ์๋ค"๋ผ๋ ์ฌ์ค์ด๋ค.
๊ธ์ ์ ์๋ 4๋ ๋์, ๊ธฐ์ ์ ์คํฌ ํฅ์์ ์ํ ์ต์ ์ ๋ฐฉ๋ฒ๋ค์ ์ฐพ๊ธฐ ์ํ ๊ณผ์ ๋ค์ ํตํด JavaScript ๊ฐ๋ฐ์๋ก์ ์ค/๊ณ ๊ธ ๋ ๋ฒจ์ ๋ ๋นจ๋ฆฌ ๋๋ฌํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์ฃผ์ ์ ๋ณด(5๋จ๊ณ)๋ฅผ ๊ณต์ ํ๋ค.
How a $725M VC Judges Your Engineering Team w/ Redpoint Ventures' Jason Warner
์ GitHub CTO์๋ Jason Warner(ํ Redpoint ๋ฒค์ฒ ์บํผํธ ๋งค๋์ )์ ํ์บ์คํธ ์ธํฐ๋ทฐ(ํ์บ์คํธ 15:20 ๋ถ๊ฒฝ)์์ ๊ทธ๋ Full-stack ๊ฐ๋ฐ์ด ์ ํํ๊ณ ์์ง๋ง, ๋ฏธ๋์๋ ๊ฐ๋ฐ๋๋ ์ ํ์ ๋ณต์ก์ฑ ์ฆ๊ฐ์ ๋ฐ๋ผ ํ๋ก๊ทธ๋๋ฐ์ ๋ฏธ๋์์ Full-stack ์์ง๋์ด์ ๊ฐ์๊ฐ ์ผ์ด๋ ๊ฒ์ด๋ฉฐ, back-end ์์ญ์์๋ ์ ๋ฌธ์ฑ์ ์งํฅํ๋ ๋ฐฉํฅ์ผ๋ก์ ๋ณํ์ ์ด๋์ด ์ด๋ค์ง ๊ฒ์ผ๋ก ์์ธกํ๋ค.
Include diagrams in your Markdown files with Mermaid
์๋๋ Markdown Mermaid syntax๋ก ๋ง๋ ๋ค์ด์ด๊ทธ๋จ
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
์ด์ Github์์ markdown ํ์ผ์์ ๋ค์ด์ด๊ทธ๋จ์ ๋ ๋๋ง ํ ์ ์๋ค.
์ด๋ค ๋ฐฉ์์ผ๋ก ๋ค์ด์ด๊ทธ๋จ์ ๋ง๋ค๊ณ ๋ ๋๋ง ํ๋์ง๋ ํ์ดํ๋ผ์ธ์ ํตํด ์ค๋ช ํด ์ฃผ๊ณ ์๋ค.
The Story of React

2013๋ React๊ฐ ์ด๊ธฐ์ ๋ฐํ๋์์ ๋ ์์ฅ์์์ ๋ฐ์์ ์ฉ ์ข์ง ์์๋ค. ํ์ง๋ง ์ง๊ธ์ React์ ์๋๋ผ ํด๋ ๊ณผ์ธ์ด ์๋ ์ ๋๋ก ๊ฐ์ฅ ์ธ๊ธฐ ์๊ณ ์ํฅ๋ ฅ ์๋ ํ๋ก์ ํธ๊ฐ ๋์๋ค.
์ด ์์์ jQuery, Backbone, Angular ์๋๋ฅผ ๊ฑธ์ณ React ์๋๋ก ์ด๋ป๊ฒ ์๋์ง์ ์ญ์ฌ๋ฅผ ์ ๋จธ ์๊ฒ ์ด์ผ๊ธฐํ๊ณ ์๋ค. 10๋ถ์ ์์ฒญ ์๊ฐ ๋์ React์ ๊ด์ ์์ Front-end์ ์ญ์ฌ๋ฅผ ๊ฐ๋ณ๊ฒ ๋๊ปด๋ณผ ์ ์์ ๊ฒ์ด๋ค.
Nobody at Facebook has worked on Jest for years
Meta(Facebook)์ ์ธ๊ธฐ ์๋ ํ ์คํธ ํ๋ ์์ํฌ์ธ Jest์ ์ฃผ์ ๊ธฐ์ฌ์์ธ Simen Bekkhus(ํ๋ก์ ํธ ์ต๋ค ์ปค๋ฐ ๊ธฐ์ฌ์)๋ ํ๋ก์ ํธ์ ํ ์ด์๋ฅผ ํตํด ์๋ ๊ฐ Meta ์์ ์ธ์๋ค์ด ์๋ ๊ฐ ๊ฐ๋ฐ์ ์ฐธ์ฌํ์ง ์๊ณ ์๋ค๋ ์ฝ๋ฉํธ๋ฅผ ๋ฑ๋กํ๋ค.
Simen์ ์ถ๊ฐ ์ฝ๋ฉํธ๋ฅผ ํตํด ๋ถํ์ํ ์คํด(์์ ์ฝ๋ฉํธ์ ๋ํ ์๋)๊ฐ ์๊ธฐ๋ ๊ฒ์ ๋ฐฉ์งํ๊ธฐ ์ํด, ์์ ์ Meta๋ก๋ถํฐ Jest ํ๋ก์ ํธ ๊ธฐ์ฌ์ ๋ํ ํ๋์ ํ๋ฉด์ ์ด๋ ํ ๋น์ฉ(๋ณด์์ ๋ํ ๊ธฐํ๋ ์ ๊ณต๋์์ผ๋)๋ ์ง๊ธ๋ฐ์ง ์์์ผ๋ฉฐ, ์ด๋ ๋ณด์ ์ง๊ธ์ ๋ฐ๊ฒ ๋๋ฉด ํ๋ก์ ํธ ์ฐธ์ฌ๊ฐ ์ ๋ฌด์ ์ฑ๊ฒฉ์ผ๋ก ๋ณํ๋ ๊ฒ์ ๋ํ ๊ฐ์ธ์ ๊ฑฐ๋ถ๊ฐ์ผ๋ก ์ธํด, ๊ฐ์ธ์ ์ ํ์ ๋ฐ๋ผ ๋ณด์์ ๋ํ ๊ธฐํ๋ฅผ ๊ฑฐ๋ถํ๋ค๋ ๋ด์ฉ๋ ํจ๊ป ๊ณต์ ํ๋ค.
How to Efficiently Merge Arrays in JavaScript
JavaScript์์ ๋ฐฐ์ด์ ํฉ์น๋ ๋ฐฉ๋ฒ์ concat
, push
๋ฉ์๋๋ฅผ ํ์ฉํ๊ฑฐ๋ spread
์คํผ๋ ์ดํฐ๋ฅผ ์ฌ์ฉํ ์ ์๋ค.
๊ฐ๊ฐ์ ๋ฐฉ๋ฒ๋ค์ด ๋ฐฐ์ด ์๋ฆฌ๋จผํธ์ ์ซ์์ ํ์
(์์ ํ์
ํน์ ๊ฐ์ฒด)์ ๋ฐ๋ผ ๋ฒค์น๋งํฌ๊ฐ ์ด๋ป๊ฒ ๋์ค๋์ง ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ํ์ธํด๋ณด์.
(์ ๋ฌธ์์ ์๋ [...array1, ...array2]
์ผ์ด์ค๊ฐ ๊ถ๊ธํ๋ค๋ฉด ์์ ์ฝ๋๋ฅผ ์ง์ ์์ ํด์ ํ์ธํด ๋ณด์.)
How React server components work: an in-depth guide

[์ฐธ๊ณ ] ๋น ๋ฅด๊ฒ ์ฝ๊ณ ์ถ๋ค๋ฉด ๋ฒ์ญ๊ธ์ ์ฐธ๊ณ ํ์.
monorepo.tools
Monorepos์ ๋ํด ์์์ผ ํ๋ ๋ชจ๋ ์ ๋ณด๋ค์ ์ ๋ฆฌํด ๋์๋ค. Monorepo๊ฐ ๋ฌด์์ธ์ง๋ถํฐ, polyrepo ๊ตฌ์กฐ์์ ๋น๊ต ๋ฑ Monorepo์ ๋ํด ๋ ์ ์ดํดํ ์ ์๋ ๋ชจ๋ ๋ฆฌ์์ค(๋์์, ํํ ๋ฆฌ์ผ, ebook ๋ฑ) ๋ค์ ๋ํ ๋งํฌ๋ฅผ ์ ๊ณตํ๋ค.
๋ํ ์ํ๊ณ์์ ์ฐพ์๋ณผ ์ ์๋ 7๊ฐ ๋๊ตฌ๋ค์ ๋ํ ๋น๊ต ํ ์ด๋ธ๋ ์ ๊ณตํ๊ธฐ ๋๋ฌธ์ ๊ฐ ๋๊ตฌ๋ค์ ์ฅ๋จ์ ์ ํ๋์ ๋น๊ตํด ๋ณผ ์ ์๋ค.
ํํ ๋ฆฌ์ผ
From JavaScript to Rust ebook
์ ์์ธ Jarrod Overson๊ฐ 21๋ 12์ 1์ผ ๋ถํฐ 24์ผ๊ฐ ๋งค์ผ ์์ ์ ๊ฐ๋ฐ ๋ธ๋ก๊ทธ ๋ฅผ ํตํด ์ฐ์ฌ๋ฅผ ์์ํ "24 days from node.js to Rust" ์๋ฆฌ์ฆ ๊ธ์ด ๊ธฐ๋ํ๋ ๊ฒ๋ณด๋ค ๋ง์ ์ด๋ค์ ๊ด์ฌ์ ๋ถ๋ฌ์ผ์ผํค์ ์ด๋ฅผ ๋ค์์ ๊ธฐ์ฌ์๋ค์ ๋์์ ํตํด ebook ํํ๋ก ๋ง๋ค๊ณ ๊ณต๊ฐํ๋ค.
์ฑ ์ ์ ๋ชฉ์์ ์ ์ถํ ์ ์๋ฏ, ์ด ์ฑ ์ JavaScript(node.js) ๊ฐ๋ฐ์๋ค์ ๊ด์ ์์ Rust๋ฅผ ํ์ตํ ์ ์๋๋ก ๋์์ค๋ค.
Three ways to create 3D particle effects

New in JavaScript: reportError โ a method to report to global event handlers
Front-end์์ ์ค๋ฅ ๋ชจ๋ํฐ๋ง์ ์ฃผ๋ก ์ ์ญ ์๋ฌ ์ด๋ฒคํธ ํธ๋ค๋ฌ๋ฅผ ํตํด ์ด๋ค์ง๋ค.
// ๋๋ window.addEventListener("error", function(){})
window.onerror = function (message, source, lineno, colno, error) {
console.log("Global error: " + error.message + ", lineno: " + lineno);
return true;
};
function triggerError() {
throw new Error('Oh no!');
}
triggerError();
// ์ถ๋ ฅ: Global error: Oh no!, lineno: 10
ํ์ง๋ง ๋ช ๋จ๊ณ ๋ ๊น์ ๋ ๋ฒจ์ call stack์์์ ์ค๋ฅ ์ฒ๋ฆฌ๋ ๋ณต์กํด์ง๋ฉฐ, ์ํฉ์ ๋ฐ๋ผ ์ค๋ฅ ๊ฐ์ฒด๊ฐ ์ค๋ฅ ํธ๋ค๋ฌ๋ก ์ ๋ฌ๋์ง ์๋ ๋ฌธ์ ๊ฐ ์๋ค.
์ ์ญ ๋ฉ์๋์ธ reportError()๋ฅผ ์ฌ์ฉํ๋ฉด call stack ์คํ์ ์ค๋จ ์์ด ์ค๋ฅ๋ฅผ ์ ์ญ ์ค๋ฅ ํธ๋ค๋ฌ๋ก ์ ๋ฌํ ์ ์๋ค.
const fns = [
() => { console.log("I'm first!"); },
() => { throw new Error("Oh no!"); },
() => { console.log("I'm third!"); },
];
// Iterate over the functions
for (const fn of fns) {
// (1) ์๋ฌ ์ดํ, ๋ฐ๋ณต๋ฌธ ์ํ์ด ์ค๋จ๋๋ค.
fn();
try {
fn();
} catch(error) {
// (2) try...catch๋ก ๊ฐ์ธ๋ฉด, ๋ฐ๋ณต๋ฌธ์ด ์ค๋จ๋์ง ์์ง๋ง, ์ ์ญ ์ค๋ฅ ํธ๋ค๋ฌ๋ก ์ค๋ฅ๊ฐ ๋ฒ๋ธ๋ง ๋์ง ์๋๋ค.
console.error(error);
// (3) reportError()๋ฅผ ํตํด ์ค๋ฅ๊ฐ ๋ฒ๋ธ๋ง ๋๋๋ก ํ ์ ์๋ค.
reportError(error);
}
}
์ฝ๋์ ๋๊ตฌ
์ด๋ ๊ฐ๋ฐ์์ Resume
Three.js๋ฅผ ํ์ฉํ์ฌ ๋ง๋ ๊ฐ๋ฐ์์ ์ด๋ ฅ์ ํ์ด์ง์ด๋ค. ๋ธ๋ผ์ฐ์ ํ์ดํ๋ฐ์ ์ฐจ๋์ ์์ง์๊น์ง ํํํ ์์ฑ๋ ๋์ ๊ฐ์ธ ์ฌ์ดํธ์ด๋ค. ์ด ์ฌ์ดํธ๋ฅผ ํตํด WebGL์ ๊ฐ๋ฅ์ฑ์ ์ดํด๋ณด๊ธฐ ๋ฐ๋๋ค.
Pixi.JS
ํ๋์จ์ด ๊ฐ์์ ์ด์ฉํ ๊ณ ์ฑ๋ฅ์ 2D WebGL ๋ ๋๋ง ๋ผ์ด๋ธ๋ฌ๋ฆฌ.
React95

React Windows95 ์ปดํฌ๋ํธ. ์์ ๋ถํฐ ์ด์์ฒด์ UI๋ฅผ ์น์์ ๊ตฌํํ๋ ํ๋ก์ ํธ๊ฐ ์ข ์ข ์์์ง๋ง ์ด ํ๋ก์ ํธ๋ ์์ฑ๋๊ฐ ์ข ๋ ๋์ ๋ณด์ธ๋ค. ์คํ ๋ฆฌ๋ถ์์ ๋ค์ํ ์ปดํฌ๋ํธ๋ค์ ์ง์ ํ์ธํด ๋ณผ ์ ์๋ค.
Hotkey 2.0
Hotkey๋ ๊นํ์์ ๊ฐ๋ฐํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก ๋จ์ถํค๋ฅผ ์ฌ์ฉํ๊ณ ์ ํ๋ ์์์ data-hotkey
์์ฑ์ ์ถ๊ฐํ๋ฉด ๊ฐํธํ๊ฒ ๋จ์ถํค๋ฅผ ๋ฑ๋กํ ์ ์๋ค. ๊ฐ๋จํ ์ฌ์ฉ๋ฒ์ ๋ค์ ์ฝ๋๋ฅผ ์ฐธ๊ณ ํ์.
<a href="/page/2" data-hotkey="j">Next</a>
<a href="/help" data-hotkey="Control+h">Help</a>
<a href="/rails/rails" data-hotkey="g c">Code</a>
<a href="/search" data-hotkey="s,/">Search</a>
import {install} from '@github/hotkey'
// Install all the hotkeys on the page
for (const el of document.querySelectorAll('[data-hotkey]')) {
install(el)
}
v8n

v8n์ ๋ฉ์๋ ์ฒด์ด๋์ ์ฌ์ฉํด ์ง๊ด์ ์ผ๋ก ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ๊ตฌํํ ์ ์๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค. ๋ค์๊ณผ ๊ฐ์ด ์ฌ์ฉํ ์ ์๋ค.
v8n()
.string()
.minLength(5)
.first("H")
.last("o")
.test("Hello"); // true