|
| 1 | +--- |
| 2 | +title: "2019-09-30: React 16.10.0, Node.js 12.11.0(worker_thread), 네트워크 요청과 UI 갱신의 경합(race)" |
| 3 | +author: "azu" |
| 4 | +translator: U-Yeong Ju |
| 5 | +layout: post |
| 6 | +date : 2019-09-30T00:47:47.448Z |
| 7 | +category: JSer |
| 8 | +tags: |
| 9 | +- React |
| 10 | +- Node |
| 11 | +- API |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +JSer.info #455 - React 16.10.0이 릴리스됐습니다. |
| 16 | + |
| 17 | +- [Release 16.10.0 (September 27, 2019) · facebook/react](https://github.com/facebook/react/releases/tag/v16.10.0) |
| 18 | + |
| 19 | +[useSubscription에 관련된 버그](https://github.com/facebook/react/issues/16396)나 [Hooks API에서 메모화가 잘 동작하지 않는 엣지케이스가 수정](https://github.com/facebook/react/pull/16359)되는 등 자잘한 버그 수정이 중점으로 이뤄졌습니다. |
| 20 | + |
| 21 | +또, 현재 실험적으로 구현돼 있는 [scheduler](https://github.com/facebook/react/tree/master/packages/scheduler)의 메모리 효율이 개선됐고 메시지 루프에 `requestAnimationFrame`이 아닌 `postMessage`를 사용하는 구현 등도 추가됐습니다. |
| 22 | + |
| 23 | +- [Scheduling in React | Philipp Spiess](https://philippspiess.com/scheduling-in-react/) |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +Node.js 12.11.0이 릴리스됐습니다. |
| 28 | + |
| 29 | +- [Node v12.11.0 (Current) | Node.js](https://nodejs.org/en/blog/release/v12.11.0/) |
| 30 | + |
| 31 | +Node.js 12.11.0에서는 Chrome 77에 해당하는 V8 7.7.299.11으로 갱신 됐습니다. |
| 32 | + |
| 33 | +- [V8 release v7.7 · V8](https://v8.dev/blog/v8-release-77) |
| 34 | + |
| 35 | +또, Node.js에서 병렬 처리가 가능한 [`worker_thread`](https://nodejs.org/api/worker_threads.html) 모듈이 안정(stable) 단계로 전환됐습니다. |
| 36 | + |
| 37 | +---- |
| 38 | + |
| 39 | +[Handling API request race conditions in React](https://sebastienlorber.com/handling-api-request-race-conditions-in-react)에는 네트워크 요청 후 UI를 갱신할 경우 발생할 수 있는 경합 조건(race conditions)에 관해 작성돼 있습니다. |
| 40 | + |
| 41 | +요청이 성공했을 때 단순히 UI를 갱신하는 것과 같이 작성하면 네트워크 지연 등으로 여러개의 요청이 송신되고 결과적으로 요청의 성공 시점과 UI 갱신 시점이 기대하는대로 일치하지 않는 문제가 발생하는 경우가 있습니다. |
| 42 | + |
| 43 | +이 문서에서는 React를 예로, 요청에 문제가 있을 경우 어떻게 회피할 수 있는지 작성돼 있으며 불필요한 요청을 무시하거나 취소하는 등의 구현 방법도 소개돼 있습니다. |
| 44 | + |
| 45 | +---- |
| 46 | + |
| 47 | +<h1 class="site-genre">헤드라인</h1> |
| 48 | + |
| 49 | +---- |
| 50 | + |
| 51 | +## React Training: React Router v5.1 |
| 52 | +[reacttraining.com/blog/react-router-v5-1/](https://reacttraining.com/blog/react-router-v5-1/ "React Training: React Router v5.1") |
| 53 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p> |
| 54 | + |
| 55 | +React Router 5.1이 릴리스 됐습니다. |
| 56 | +Hooks API를 추가적으로 지원합니다. |
| 57 | +`useParams`, `useLocation`, `useHistory` 등의 API가 추가 됐습니다. |
| 58 | + |
| 59 | + |
| 60 | +---- |
| 61 | + |
| 62 | +## Announcing React Native 0.61 with Fast Refresh · React Native |
| 63 | +[facebook.github.io/react-native/blog/2019/09/18/version-0.61](https://facebook.github.io/react-native/blog/2019/09/18/version-0.61 "Announcing React Native 0.61 with Fast Refresh · React Native") |
| 64 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">iOS</span> <span class="jser-tag">Android</span> <span class="jser-tag">ReleaseNote</span></p> |
| 65 | + |
| 66 | +React Native 0.61이 릴리스됐습니다. |
| 67 | +Fast Refresh = live reload + hot reloading. |
| 68 | +`use_frameworks!`를 사용할 경우 발생하는 Cocoapod 문제가 수정됐고 React의 버전이 16.9로 갱신됐습니다. 그리고 `useWindowDimensions` Hook API가 추가됐습니다. |
| 69 | + |
| 70 | + |
| 71 | +---- |
| 72 | + |
| 73 | +## Release 16.10.0 (September 27, 2019) · facebook/react |
| 74 | +[github.com/facebook/react/releases/tag/v16.10.0](https://github.com/facebook/react/releases/tag/v16.10.0 "Release 16.10.0 (September 27, 2019) · facebook/react") |
| 75 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">ReleaseNote</span></p> |
| 76 | + |
| 77 | +React 16.10.0이 릴리스 됐습니다. |
| 78 | +실험적으로 구현한 Scheduler의 메모리 사용 효율이 개선됐으며 `requestAnimationFrame`이 아니라 `postMessage`를 사용해 보다 짧은 주기로 체크할 수 있도록 구현됐습니다. 또, `useSubscription`의 버그가 수정됐습니다. |
| 79 | + |
| 80 | + |
| 81 | +---- |
| 82 | + |
| 83 | +## V8 release v7.8 · V8 |
| 84 | +[v8.dev/blog/v8-release-78](https://v8.dev/blog/v8-release-78 "V8 release v7.8 · V8") |
| 85 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">V8</span> <span class="jser-tag">ReleaseNote</span></p> |
| 86 | + |
| 87 | +V8 v7.8이 릴리스됐습니다. |
| 88 | +Script Streaming으로 JavaScript를 가져올때의 성능과 객체 구조 분해 할당(destructuring) 성능이 개선 됐습니다. |
| 89 | +또, V8 API에서 WebAssembly C/C++ API를 공식적으로 지원합니다. |
| 90 | + |
| 91 | + |
| 92 | +---- |
| 93 | + |
| 94 | +## Node v12.11.0 (Current) | Node.js |
| 95 | +[nodejs.org/en/blog/release/v12.11.0/](https://nodejs.org/en/blog/release/v12.11.0/ "Node v12.11.0 (Current) | Node.js") |
| 96 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">ReleaseNote</span></p> |
| 97 | + |
| 98 | +Node v12.11.0이 릴리스 됐습니다. |
| 99 | +V8 7.7로 갱신, `worker_thread` 모듈이 안정(stable) 단계로 변경됐습니다. |
| 100 | + |
| 101 | + |
| 102 | +---- |
| 103 | + |
| 104 | +## Release v2 Cosmic Jellyfish · gpujs/gpu.js |
| 105 | +[github.com/gpujs/gpu.js/releases/tag/2.0.0](https://github.com/gpujs/gpu.js/releases/tag/2.0.0 "Release v2 Cosmic Jellyfish · gpujs/gpu.js") |
| 106 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p> |
| 107 | + |
| 108 | +gpu.js 2.0.0이 릴리스됐습니다. |
| 109 | +Video input을 지원하며 `gpu.setInjectedNative()`와 `mode` 옵션에 `dev`가 추가됐습니다. |
| 110 | + |
| 111 | + |
| 112 | +---- |
| 113 | +<h1 class="site-genre">아티클</h1> |
| 114 | + |
| 115 | +---- |
| 116 | + |
| 117 | +## Handling API request race conditions in React |
| 118 | +[sebastienlorber.com/handling-api-request-race-conditions-in-react](https://sebastienlorber.com/handling-api-request-race-conditions-in-react "Handling API request race conditions in React") |
| 119 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">React</span> <span class="jser-tag">article</span></p> |
| 120 | + |
| 121 | + |
| 122 | +네트워크 지연 등으로 여러개의 요청이 송신되고 결과적으로 요청의 성공 시점과 UI 갱신 시점이 기대하는대로 일치하지 않는 문제에 대해서 이야기합니다. |
| 123 | +React를 예로, 요청에 문제가 있을 경우 어떻게 회피할 수 있는지 작성돼 있으며 불필요한 요청을 무시하거나 취소하는 등의 구현 방법도 소개돼 있습니다. |
| 124 | + |
| 125 | + |
| 126 | +---- |
| 127 | + |
| 128 | +## TypeScript Tutorial for Beginners: The Missing Guide (2019) |
| 129 | +[www.valentinog.com/blog/typescript/](https://www.valentinog.com/blog/typescript/ "TypeScript Tutorial for Beginners: The Missing Guide (2019)") |
| 130 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">TypeScript</span> <span class="jser-tag">tutorial</span> <span class="jser-tag">article</span></p> |
| 131 | + |
| 132 | +초보자를 대상으로 한 TypeScript 튜토리얼입니다. |
| 133 | + |
| 134 | + |
| 135 | +---- |
| 136 | + |
| 137 | +## Working with GitHub Actions | Jeff Rafter |
| 138 | +[jeffrafter.com/working-with-github-actions/](https://jeffrafter.com/working-with-github-actions/ "Working with GitHub Actions | Jeff Rafter") |
| 139 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">Github</span> <span class="jser-tag">Actions</span> <span class="jser-tag">article</span> <span class="jser-tag">testing</span></p> |
| 140 | + |
| 141 | +Node.js + TypeScript로 GitHub Actions를 작성하는 튜토리얼입니다. |
| 142 | +`@actions/core` 사용법과 Github API로의 요청, 디버깅 방법, 테스트 방법 등에 대해 소개돼 있습니다. |
| 143 | + |
| 144 | + |
| 145 | +---- |
| 146 | + |
| 147 | +## Why Your Angular App Is Not Working: 7 Common Mistakes - DEV Community 👩💻👨💻 |
| 148 | +[dev.to/valeriopisapia/why-your-angular-app-is-not-working-7-common-mistakes-2ba1](https://dev.to/valeriopisapia/why-your-angular-app-is-not-working-7-common-mistakes-2ba1 "Why Your Angular App Is Not Working: 7 Common Mistakes - DEV Community 👩💻👨💻") |
| 149 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">Angular</span> <span class="jser-tag">article</span></p> |
| 150 | + |
| 151 | +Angular 애플리케이션에서 흔히 겪는 오류와 수정 방법에 대해 작성돼 있습니다. |
| 152 | + |
| 153 | + |
| 154 | +---- |
| 155 | + |
| 156 | +## swyx Writing | Why JavaScript Tooling Sucks |
| 157 | +[www.swyx.io/writing/js-tooling/](https://www.swyx.io/writing/js-tooling/ "swyx Writing | Why JavaScript Tooling Sucks") |
| 158 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">community</span> <span class="jser-tag">Tools</span> <span class="jser-tag">opinion</span> <span class="jser-tag">article</span></p> |
| 159 | + |
| 160 | +JavaScript의 툴링이 왜 어려운지 이야기합니다. |
| 161 | +JavaScript의 시작, 거대한 커뮤니티, 타겟의 변화, 바텀-업, 오너쉽과 semver, 도구를 만드는 사람과 사용하는 사람, 펀딩 문제등을 이야기하며 이 외로 좋은 점에 대해서도 거론합니다. |
| 162 | +JavaScript 애플리케이션의 97%는 npm을 토대로 구성되기 때문에 OSS 문제는 곧 JavaScript의 문제로 보인다는 개인적인 의견도 함께 담고 있습니다. |
| 163 | + |
| 164 | + |
| 165 | +---- |
| 166 | +<h1 class="site-genre">사이트, 서비스, 문서</h1> |
| 167 | + |
| 168 | +---- |
| 169 | + |
| 170 | +## Webtest.app - Testing websites with and without adblocker |
| 171 | +[webtest.app](https://webtest.app "Webtest.app - Testing websites with and without adblocker") |
| 172 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">webservice</span> <span class="jser-tag">Tools</span> <span class="jser-tag">performance</span></p> |
| 173 | + |
| 174 | +웹 사이트를 uBlock Origin 등과 같은 Adblock을 경유(사용)할 경우 제외(block)된 요청과 Cookie, 전체 페이지 크기, 성능 지표 등을 비교 측정하여 제공하는 도구입니다. |
| 175 | + |
| 176 | + |
| 177 | +---- |
| 178 | +<h1 class="site-genre">소프트웨어, 도구, 라이브러리</h1> |
| 179 | + |
| 180 | +---- |
| 181 | + |
| 182 | +## chroventer/endb: Simple key-value database with multi adapter support |
| 183 | +[github.com/chroventer/endb](https://github.com/chroventer/endb "chroventer/endb: Simple key-value database with multi adapter support") |
| 184 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span> <span class="jser-tag">JavaScript</span> <span class="jser-tag">library</span></p> |
| 185 | + |
| 186 | +MySQL과 Redis 등을 백엔드로 두고 사용가능한 KVS 라이브러리입니다. |
| 187 | + |
| 188 | + |
| 189 | +---- |
| 190 | + |
| 191 | +## oframe/ogl: Minimal WebGL framework |
| 192 | +[github.com/oframe/ogl](https://github.com/oframe/ogl "oframe/ogl: Minimal WebGL framework") |
| 193 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">WebGL</span> <span class="jser-tag">library</span></p> |
| 194 | + |
| 195 | +WebGL 프레임워크입니다. |
| 196 | +추상도가 낮고 Math/Core/Extras 모듈로 구성돼 있습니다. |
| 197 | + |
| 198 | + |
| 199 | +---- |
| 200 | +<h1 class="site-genre">도서</h1> |
| 201 | + |
| 202 | +---- |
| 203 | + |
| 204 | +## valentinogagliardi/Little-JavaScript-Book: The Little JavaScript Book |
| 205 | +[github.com/valentinogagliardi/Little-JavaScript-Book](https://github.com/valentinogagliardi/Little-JavaScript-Book "valentinogagliardi/Little-JavaScript-Book: The Little JavaScript Book") |
| 206 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">book</span></p> |
| 207 | + |
| 208 | +JavaScript를 주제로한 도서입니다. |
| 209 | + |
| 210 | + |
| 211 | +---- |
0 commit comments