dev + it dev react [React] <Input>의 value에 접근하기React에서 <Input>의 value에 접근하는 방법 wono | discuss | tweet + it dev nextjs react-error-boundary [React] ErrorBoundary & Suspense, 거의 완벽한 사용방법 가이드📒 ErrorBoundary & Suspense, 거의 완벽한 사용방법 가이드잘 만든 Errorboundary백개의 try-catch 안 부럽다.프론트 개발을 계속하다 보니 다양한 상황을 마주치게 되었고, 그에 따른 적절한 화면 표현의 중요성을 점차 느껴갔습니다.대표적으로 서버 데이터에 대한 로딩과 에러 처리가 있죠.끊임없이 사용해 보고 개선해 보니 1년이 지난 지금에서야 어느 정도 감이 잡히는 거 같아 그 방법을 공유해보려 합니다.이 글은 실제 서비스에서의 적용 방법에 대해 설명하는 글이기 때문에 ErrorBoundary와 Suspense에 대한 개념은 아래 글을 참조해 주세요.ErrorBoundary를 통한 선언적인 에러 핸들링, react-query를 이용한 재호출 방법Suspense을 사용해 선.. wono | discuss | tweet + it dev nextjs error Understand Error Handling in Modern Next.jsWe cover how to handle errors on both the client and server sides, explaining error handling and its process and the types of errors specific to Next.js apps. wono | discuss | tweet + it dev nextjs error Next.js 에러 핸들링#next.js | Next.js 에러 핸들링을 위해 루트에 error.tsx파일을 생성했습니다. 특정페이지에서 서버 컴포넌트를 만든 후 `throw new Error` 를 통해 에... wono | discuss | tweet + it dev typescript unused Unused underscore variables not being ignored by lint rules · Issue #19614 · microsoft/TypeScriptTypeScript Version: 2.7.0-dev.20171031, 2.6.1 (Regression from 2.5.3) Expected behavior: Variables with names that begin with an underscore do not cause an error if not used. Actual behavior: components/panel/panel.ts(22,11): error TS613... wono | discuss | tweet + it dev react report print React 특정 컴포넌트 프린트하기(한 장/여러 장)회사에서 개발한 기능 중 환자의 리포트를 프린트하는 기능이 있었다. 전체 화면이 아니라 리포트 부분만 프린트해야 해서 ReactToPrint 라이브러리를 사용했다. wono | discuss | tweet + it dev nextjs auth Authentication Best Practices in Next.js: Middleware vs. Page-Level ApproachesAuthentication is a cornerstone of modern web development. With frameworks like Next.js, developers are equipped with powerful tools to manage authentication seamlessly. However, choosing the right… wono | discuss | tweet + it dev nestjs naming file naming in nest.jsThis question is about code styling in Nestjs. This framework suggests file naming lowercase letters and across the dot. Example: file user.service.ts export class UserService { } another file imp... wono | discuss | tweet + it dev typescript export Avoid Export Default | TypeScript Deep Dive wono | discuss | tweet + it dev nestjs naming NestJS - 네이밍 규칙NestJS는 일반적으로 아래와 같은 규칙을 따른다. 1. 파일명은 .으로 연결하고, 둘 이상의 단어로 구성되어 있을 시 -로 연결 hello.controller.ts my-first.controller.ts 2. 클래스명은 카멜 케이스 사용 HelloController MyFirstController 3. 같은 디렉터리에 있는 클래스의 경우 index.ts 사용 // index.ts 미사용 import { HelloController } from './contrllers/hello.controller' import { MyFirstController } from './contrllers/my-first.controller' // index.ts 사용 import { HelloController, MyF.. wono | discuss | tweet + it dev react-query 6. React Query가 필요한 이유나는 React Query를 좋아한다. React Query가 React앱에서 비동기 상태를 다루는 방식을 단순화하기 때문이다. 하지만 가끔 서버에서 데이터를 페칭해오는 것처럼 "간단한" 작업에는 React Query가 필요하지 않다고 주장하는 글들을 볼 수 있다.React Query가 제공하는 모든 추가 기능이 필요한 것은 아니니까, useEffect 안에서 fetch를 사용하는 것만으로도 충분할 때 굳이 서드파티 라이브러리를 추가하고 싶지 않다는 것이다. 이는 어느 정도 맞는 말이다.React Query는 캐싱, retry, polling, 데이터 동기화, prefetching 등 많은 기능을 제공한다.이러한 기능들이 필요하지 않다면 괜찮지만, 그렇다고 해서 React Query를 사용하지 말아야 한.. wono | discuss | tweet + it dev react state 어떤 상황에서 Zustand와 Jotai를 선택해야 할까?Frontend, React 클라이언트 상태 관리 도구 선택 가이드: Zustand vs Jotai wono | discuss | tweet + it dev typescript javascript TypeScript compile and keep commentsI like to have my comments intact in the resulting javascript file, by default the compiler removes them. Is there a tsc parameter for that? (The use case is to keep /// reference path's = ... for wono | discuss | tweet + it dev nextjs interceptor Introduce experimental Request Interceptors by unstubbable · Pull Request #70961 · vercel/next.jsNoteThis API is unstable and might change or not be shipped as stable. This PR introduces Request Interceptors as a complementary solution to Middleware. They allow users to run code at the origin... wono | discuss | tweet + it dev nextjs auth role How to Configure Secure Routes Using Next.js Middleware — the right way!Protecting routes in frontend has always been a daunting task for me anytime I have to work on authentication-based applications— in Next.js. Not because the solution doesn't exist out there on the… wono | discuss | tweet + it dev kysely rawsql [Feature]: Allow executing raw queries with a more idiomatic way · Issue #455 · kysely-org/kyselyCurrently executing raw queries has the following structure sql`SELECT 1 AS result`.execute(kysely) It would be nice to have it the other way around as well as people naturally tend to think with the current instance first. kysely.execut... wono | discuss | tweet + it dev typescript tsconfig 📘 타입스크립트 컴파일 설정 - tsconfig 옵션 총정리타입스크립트 컴파일 설정 tsconfig.json은 타입스크립트를 자바스크립트로 변환 시키는 컴파일 설정을 한꺼번에 정의 해놓는 파일이라고 보면 된다. 프로젝트를 컴파일 하는데 필요한 루트 파일, 컴파일러 옵션 등을 상세히 설정할 수 있다. 보통 tsconfig.json 파일은 TypeScript 프로젝트의 루트 디렉토리(Root Directory)에 위치된다. 그래서 tsconfig.json 파일이 프로젝트에 있다면 vscode는 우리가 타입스크립트로 개발한다는 것을 인식하게 되는 것이다. tsconfig에서 옵션들을 미리 정의해 놓으면, 더이상 컴파일 할때 명령어에 일일히 대상 파일이나 옵션을 지정하지 않아도 된다. 그래서 tsc 나 ts-node 명령어를 그냥 실행하게 되면, 현재 폴더에 있는 ts.. wono | discuss | tweet + it dev nextjs modal [Next.js] 라우팅으로 모달 구현하기React에서는 모달을 구현해야 한다면 useState나 전역 상태를 통해 모달을 구현하였다. 그러나 Next.js에서는 별도의 상태없이 모달을 라우팅만으로도 구현할 수 있다. 라우팅만으로 모달을 구현하기 위해서는 Next.js가 제공하는 라우팅 방법 중 병렬 라우 wono | discuss | tweet + it dev github flow 좋은 git 커밋 메시지를 작성하기 위한 7가지 약속 : NHN Cloud Meetup기술을 공유하고 함께 성장해가는 개발 문화, NHN이 추구하는 가치입니다. wono | discuss | tweet + it dev github flow 깃 커밋 컨벤션 정하기git commit convention 정하기 커밋 메세지 란 커밋을 할 때, 현재 commit 이 정확히 무엇과 관련한 개발에 해당하고, 어떤 변경 사항이 있는지 등을 작성하는 것을 말합니다. 커밋 메세지의 간단한 예시를 보면 다음과 같습니다. (제목, 본문, 꼬리말이 모두 담겨있습니다.) Feat: "로그인 함수 추가" 로그인 요청을 위한 함수 구현 Closes: #123 커밋 메세지를 잘 작성하면, 우리는 단순히 커밋 이력만 보고서도 현재까지 어떤 개발이 진행되었고, 어떤 커밋에서 문제가 발생했는지 등을 확인할 수 있게 됩니다. 특히나 규모가 큰 개발일수록 이 커밋 메세지는 더욱 중요해집니다. TIP! 만약 커밋 메세지를 vim편집기에서 작성하고 싶다면 git commit 이라고만 입력하면 됩니다... wono | discuss | tweetNext
+ it dev nextjs react-error-boundary [React] ErrorBoundary & Suspense, 거의 완벽한 사용방법 가이드📒 ErrorBoundary & Suspense, 거의 완벽한 사용방법 가이드잘 만든 Errorboundary백개의 try-catch 안 부럽다.프론트 개발을 계속하다 보니 다양한 상황을 마주치게 되었고, 그에 따른 적절한 화면 표현의 중요성을 점차 느껴갔습니다.대표적으로 서버 데이터에 대한 로딩과 에러 처리가 있죠.끊임없이 사용해 보고 개선해 보니 1년이 지난 지금에서야 어느 정도 감이 잡히는 거 같아 그 방법을 공유해보려 합니다.이 글은 실제 서비스에서의 적용 방법에 대해 설명하는 글이기 때문에 ErrorBoundary와 Suspense에 대한 개념은 아래 글을 참조해 주세요.ErrorBoundary를 통한 선언적인 에러 핸들링, react-query를 이용한 재호출 방법Suspense을 사용해 선.. wono | discuss | tweet
+ it dev nextjs error Understand Error Handling in Modern Next.jsWe cover how to handle errors on both the client and server sides, explaining error handling and its process and the types of errors specific to Next.js apps. wono | discuss | tweet
+ it dev nextjs error Next.js 에러 핸들링#next.js | Next.js 에러 핸들링을 위해 루트에 error.tsx파일을 생성했습니다. 특정페이지에서 서버 컴포넌트를 만든 후 `throw new Error` 를 통해 에... wono | discuss | tweet
+ it dev typescript unused Unused underscore variables not being ignored by lint rules · Issue #19614 · microsoft/TypeScriptTypeScript Version: 2.7.0-dev.20171031, 2.6.1 (Regression from 2.5.3) Expected behavior: Variables with names that begin with an underscore do not cause an error if not used. Actual behavior: components/panel/panel.ts(22,11): error TS613... wono | discuss | tweet
+ it dev react report print React 특정 컴포넌트 프린트하기(한 장/여러 장)회사에서 개발한 기능 중 환자의 리포트를 프린트하는 기능이 있었다. 전체 화면이 아니라 리포트 부분만 프린트해야 해서 ReactToPrint 라이브러리를 사용했다. wono | discuss | tweet
+ it dev nextjs auth Authentication Best Practices in Next.js: Middleware vs. Page-Level ApproachesAuthentication is a cornerstone of modern web development. With frameworks like Next.js, developers are equipped with powerful tools to manage authentication seamlessly. However, choosing the right… wono | discuss | tweet
+ it dev nestjs naming file naming in nest.jsThis question is about code styling in Nestjs. This framework suggests file naming lowercase letters and across the dot. Example: file user.service.ts export class UserService { } another file imp... wono | discuss | tweet
+ it dev nestjs naming NestJS - 네이밍 규칙NestJS는 일반적으로 아래와 같은 규칙을 따른다. 1. 파일명은 .으로 연결하고, 둘 이상의 단어로 구성되어 있을 시 -로 연결 hello.controller.ts my-first.controller.ts 2. 클래스명은 카멜 케이스 사용 HelloController MyFirstController 3. 같은 디렉터리에 있는 클래스의 경우 index.ts 사용 // index.ts 미사용 import { HelloController } from './contrllers/hello.controller' import { MyFirstController } from './contrllers/my-first.controller' // index.ts 사용 import { HelloController, MyF.. wono | discuss | tweet
+ it dev react-query 6. React Query가 필요한 이유나는 React Query를 좋아한다. React Query가 React앱에서 비동기 상태를 다루는 방식을 단순화하기 때문이다. 하지만 가끔 서버에서 데이터를 페칭해오는 것처럼 "간단한" 작업에는 React Query가 필요하지 않다고 주장하는 글들을 볼 수 있다.React Query가 제공하는 모든 추가 기능이 필요한 것은 아니니까, useEffect 안에서 fetch를 사용하는 것만으로도 충분할 때 굳이 서드파티 라이브러리를 추가하고 싶지 않다는 것이다. 이는 어느 정도 맞는 말이다.React Query는 캐싱, retry, polling, 데이터 동기화, prefetching 등 많은 기능을 제공한다.이러한 기능들이 필요하지 않다면 괜찮지만, 그렇다고 해서 React Query를 사용하지 말아야 한.. wono | discuss | tweet
+ it dev react state 어떤 상황에서 Zustand와 Jotai를 선택해야 할까?Frontend, React 클라이언트 상태 관리 도구 선택 가이드: Zustand vs Jotai wono | discuss | tweet
+ it dev typescript javascript TypeScript compile and keep commentsI like to have my comments intact in the resulting javascript file, by default the compiler removes them. Is there a tsc parameter for that? (The use case is to keep /// reference path's = ... for wono | discuss | tweet
+ it dev nextjs interceptor Introduce experimental Request Interceptors by unstubbable · Pull Request #70961 · vercel/next.jsNoteThis API is unstable and might change or not be shipped as stable. This PR introduces Request Interceptors as a complementary solution to Middleware. They allow users to run code at the origin... wono | discuss | tweet
+ it dev nextjs auth role How to Configure Secure Routes Using Next.js Middleware — the right way!Protecting routes in frontend has always been a daunting task for me anytime I have to work on authentication-based applications— in Next.js. Not because the solution doesn't exist out there on the… wono | discuss | tweet
+ it dev kysely rawsql [Feature]: Allow executing raw queries with a more idiomatic way · Issue #455 · kysely-org/kyselyCurrently executing raw queries has the following structure sql`SELECT 1 AS result`.execute(kysely) It would be nice to have it the other way around as well as people naturally tend to think with the current instance first. kysely.execut... wono | discuss | tweet
+ it dev typescript tsconfig 📘 타입스크립트 컴파일 설정 - tsconfig 옵션 총정리타입스크립트 컴파일 설정 tsconfig.json은 타입스크립트를 자바스크립트로 변환 시키는 컴파일 설정을 한꺼번에 정의 해놓는 파일이라고 보면 된다. 프로젝트를 컴파일 하는데 필요한 루트 파일, 컴파일러 옵션 등을 상세히 설정할 수 있다. 보통 tsconfig.json 파일은 TypeScript 프로젝트의 루트 디렉토리(Root Directory)에 위치된다. 그래서 tsconfig.json 파일이 프로젝트에 있다면 vscode는 우리가 타입스크립트로 개발한다는 것을 인식하게 되는 것이다. tsconfig에서 옵션들을 미리 정의해 놓으면, 더이상 컴파일 할때 명령어에 일일히 대상 파일이나 옵션을 지정하지 않아도 된다. 그래서 tsc 나 ts-node 명령어를 그냥 실행하게 되면, 현재 폴더에 있는 ts.. wono | discuss | tweet
+ it dev nextjs modal [Next.js] 라우팅으로 모달 구현하기React에서는 모달을 구현해야 한다면 useState나 전역 상태를 통해 모달을 구현하였다. 그러나 Next.js에서는 별도의 상태없이 모달을 라우팅만으로도 구현할 수 있다. 라우팅만으로 모달을 구현하기 위해서는 Next.js가 제공하는 라우팅 방법 중 병렬 라우 wono | discuss | tweet
+ it dev github flow 좋은 git 커밋 메시지를 작성하기 위한 7가지 약속 : NHN Cloud Meetup기술을 공유하고 함께 성장해가는 개발 문화, NHN이 추구하는 가치입니다. wono | discuss | tweet
+ it dev github flow 깃 커밋 컨벤션 정하기git commit convention 정하기 커밋 메세지 란 커밋을 할 때, 현재 commit 이 정확히 무엇과 관련한 개발에 해당하고, 어떤 변경 사항이 있는지 등을 작성하는 것을 말합니다. 커밋 메세지의 간단한 예시를 보면 다음과 같습니다. (제목, 본문, 꼬리말이 모두 담겨있습니다.) Feat: "로그인 함수 추가" 로그인 요청을 위한 함수 구현 Closes: #123 커밋 메세지를 잘 작성하면, 우리는 단순히 커밋 이력만 보고서도 현재까지 어떤 개발이 진행되었고, 어떤 커밋에서 문제가 발생했는지 등을 확인할 수 있게 됩니다. 특히나 규모가 큰 개발일수록 이 커밋 메세지는 더욱 중요해집니다. TIP! 만약 커밋 메세지를 vim편집기에서 작성하고 싶다면 git commit 이라고만 입력하면 됩니다... wono | discuss | tweet