JavaScript Weekly Apr. 2nd

0

IT Weekly Issue

목록 보기
2/4
post-thumbnail

😎 Main Issue 😎

1) Decorators 가 Stage 3에 도달했다! (곧 정식 기능으로 추가되지 않을까?)

Decorators for ES6 Classes Proposal (Mostly) Reaches Stage 3 at TC39
— We first linked to this proposal three years ago but it’s now conditionally made it to stage 3 (with some tweaks required) and people are very excited. Despite dating from 2019, Mike Green’s explanation of the idea remains a good accessible overview of the basic idea, if the proposal feels too technical.

⇒ ☝🏻 TC39는 ECMA script를 관리하는 표준 위원회다.
stage 2.단계는 초고 단계인데 decorators가 stage 3에 도달했음은 곧 초고가 끝나고 완성에 가까워졌기 때문에 ES 버전에 도입되어 정식 기능이 된다는 말이겠지! 이전까지는 Babel을 거쳐서 사용했는데, 정식 기능이 된다면 이미 사용해버린 데코레이터를 수정하거나 babel의 데코레이터 플러그인을 레거시 모드로 계속 사용해야 하기 때문에 비용이 발생 할 수 있겠다.

☝🏻 TC39 구성원은 Mozilla, Google, Apple, MS, Facebook, Twitter등 메이저 그룹 등 다양하게 이루어져 있다.
엄청난 대기업들이 구성원이라니.. 먼나라 이야기 같다. 하지만 모든 회의록과 진행상황이 전부 GitHub를 통해 공유되고 있고 조회가 가능하다. 때문에 누구든지 챔피언(제안하고자 하는 proposal을 끌고 나갈 TC39구성원)을 구해서 proposal를 제출하거나 의견을 낼 수 있다!

☝🏻 Proposal-Decorators 에 대해서 자세한 내용을 확인해보라. (한글 설명은 여기 또는 여기)
데코레이터는 클래스에서 호출되는 함수이고 단어 그대로 ‘장식'해준다는 기능이다. 서로 관련 없는 클래스 사이의 동작 공유를 단순화 시킬 수 있기 때문에(랩핑) 상당히 도움이 되는 도구 중 하나이다.

@+decorator 함수 식으로 사용한다.

@defineElement("my-class")
class C extends HTMLElement {
  @reactive accessor clicked = false;
}

☝🏻 Decorators 주요한 세 가지 기능 :

  1. They can replace the value that is being decorated with a matching value that has the same semantics. (e.g. a decorator can replace a method with another method, a field with another field, a class with another class, and so on).
  2. They can provide access to the value that is being decorated via accessor functions which they can then choose to share.
  3. They can initialize the value that is being decorated, running additional code after the value has been fully defined. In cases where the value is a member of class, then initialization occurs once per instance.

2) React 18 버전이 Release 되었다 (알파버전) !

The plan was for v18 to be an easy upgrade even if there were many changes under the hood.. and despite the introduction of a new concurrent renderer, Suspense, new hooks, automatic batching, and more, they’ve done a great job keeping the ship steady.
The React 18 upgrade guide covers some things you need to consider, and if you’re a completist, the change log digs deep.
한글버전으로 아주 요약이 잘 되어있는 포스트 공유!


😎 Code & Tools 😎

  • Visual Studio Code March 2022 Released!!
    — VS Code는 매 달 업데이트를 하지만 이번 업데이트는 특히 자바스크립트 개발들에게 더 크게 느껴지는 업데이트다!
    1) Native local history support is the headline feature but the JS debugger now lets you collect and visualize heap profiles to keep an eye on memory allocation.
    2) also now get JS highlighting when within HTML files.


IN BRIEF:

  • 👾 Kyle Simpson of You Don't Know JS Yet fame, has been keeping me updated on progress with his Dwordly game
    :
    Dwordly (Dwindling Wordle) is a flip-twist of the famous viral game. In Dwordly, there's no guessing or luck. Just use your expansive vocabulary to dwindle given words down to the shortest possible!
    – it's quite fun, and an interesting change to Wordle. ✅
    – 알파벳 줄여가면서 단어를 만드는 게임인데 꽤나 흥미롭다 !

0개의 댓글