스크랩

    React 근황

    https://react.dev/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024 React Labs: What We've Been Working On – February 2024 – React The library for web and native user interfaces react.dev RSC에서 실험적으로 테스트중인 cache https://react.dev/reference/react/cache cache – React The library for web and native user interfaces react.dev https://youtu.be/LL4V8CcEhIo - 메타 친구들은 자사 서비스에서 테스트 후 s..

    graphql-codegen-typescript-mock-data

    회사에서 Typescript + GraphQl을 사용하고 있다 보니 테스트에 필요한 mocking data를 만드는 게 어렵지 않다.(타입 추론) 그런데 프로젝트에 테스트가 300개가 넘어가니까 매번 테스트마다 mocking을 해주는게 정말 일이었다;; 이전 회사에서 rest API 작업을 할 때 했던 방법대로 intermock을 통해 mocking을 해보려고 했는데 여의치 않았다. intermock 자체가 지원하는 타입이 제한적이고 미완성이라는 느낌이 많이 나서 사용하지 못하고 있었다 ㅠㅠ [TS] Type과 Interface로 테스트용 Mock Data 만들기 Mock Data의 필요성 프론트엔드 개발을 하는 입장에서는 백엔드 API가 이미 다 준비되어 있고, 인터페이스도 공유가 된 상태에서 작업을 ..

    자바스크립트는 왜 프로토타입을 선택했을까

    제목과는 달리 왜 선택했는지는 알 수 없었지만, 그 외 모든부분에서 큰 영감을 받은 글. 읽고 또 읽자. 자바스크립트는 왜 프로토타입을 선택했을까 프로토타입으로 검색하면 으레 나오는 서두처럼 저 또한 자바스크립트를 처음 접했을 때 가장 당황스러웠던 게 프로토타입이었습니다. medium.com

    모든 자바스크립트 개발자가 사용할 수 있는 10가지 트릭

    원문 10 Modern JavaScript Tricks Every Developer Should Use Tips for writing short, concise, and clean JavaScript code betterprogramming.pub 1. 조건부 객체 프로퍼티 추가 const condition = true; const person = { id:1. name: 'seo', ...(condition && {age:16}), } 2. 객체 내 프로퍼티 존재여부 확인 const person = {name:'seo', salary: 1000}; console.log('salary' in person); // true 3. 객체 내 동적 프로퍼티 네임 할당 const dynamic = 'locale'..

    자바스크립트 핸드북(WTF js)

    github.com/denysdovhan/wtfjs/blob/master/README-kr.md denysdovhan/wtfjs 🤪 A list of funny and tricky JavaScript examples. Contribute to denysdovhan/wtfjs development by creating an account on GitHub. github.com

    안전한 any type 만들기

    안전한 any 타입 만들기 타입스크립트에서 existential type 인코딩하기 overcurried.netlify.app 도저히 스크랩을 안 하고는 못 버티겠다.

    ubuntu home server - macbook 연동

    everycommit.tistory.com/4 자작 NAS (4) - 내부 파일 공유 환경 구축 1(Ubuntu - Mac AFP) NAS를 구축하려는 가장 큰 목적은 파일 서버로, 저장소 공유 환경을 만드는 것이다. 우선 NAS 저장공간을 로컬폴더처럼 간편하게 사용할 수 있는 '내부 네트워크 환경'을 만들어보자. 집에서 맥북 everycommit.tistory.com 시간날때 해놔야겠다.

    Restful API에 대한 정리

    REST API와 RESTful API 1. REST란? Representational State Transfe라는 용어의 약자이다. 자원을 URI로 표시하고 해당 자원의 상태를 주고 받는 것을 의미한다. REST의 구성 요소는 자원(Resource): URI 행위(Verb): HTTP METHOD 표현(Representat velog.io 1. REST란? Representational State Transfe라는 용어의 약자이다. 자원을 URI로 표시하고 해당 자원의 상태를 주고 받는 것을 의미한다. REST의 구성 요소는 자원(Resource): URI 행위(Verb): HTTP METHOD 표현(Representations) 로 이루어져 있다. 즉 Rest는 URI를 통해 자원을 표시하고, HTT..

    create-react-app 레퍼런스

    상대경로 빌드할 일이 있을때 참고해야겠다 Create React App · Set up a modern web app by running one command. `npm run build` creates a `build` directory with a production build of your app. Set up your favorite HTTP server so that a visitor to your site is served `index.html`, and requests to static paths like `/static/js/main..js` are served with the conte create-react-app.dev

    react에 super(props)를 써야하는 이유

    https://min9nim.github.io/2018/12/super-props/ [React] super(props) 를 써야하는 이유 이 글은 Dan Abramov의 Why Do We Write super(props)? 글을 충분한 의역으로 번역한 것입니다. 번역이 일부 자연스럽지 않은 부분이 있을 수도 있습니다. 정확한 내용은 원문을 참고하기 바랍니다 최근 Hooks min9nim.github.io js언어에선 상속 클래스의 특성상 super()이 생성자에 강제된다. super()만 선언하더라도 작동은 보장된다. (props가 생성자 이후에 자동으로 세팅됨) 다만 생성자 호출 이후에 props가 세팅되기 때문에, 생성자 내부에서 사용되는 this.props는 undefined가 되어버린다. 이 때..