본문 바로가기

Category362

패스트캠퍼스 챌린지 34일차 (Skeleton) 22.2.26 (토) +34days 스켈레톤(Skeleton) 이란 ? 데이터가 로드되기 전에 콘텐츠의 자리비움(placeholder)를 표시해서 사용자가 기다리는 시간을 좀 덜 지루하게 느끼게끔 하는 UI 스켈레톤 컴포넌트의 장단점 장점 (Pros) 아래의 표는 80명의 참가자를 대상으로 스켈레톤, 스피너, 블랭크 화면을 보여주며 테스트 했을 때 인지되는 로딩 시간을 보여줌. 결과적으로 블랭크 페이지 < 스피터 < 스켈레톤 순서대로 더 빠르다고 느끼게 됨. 단점 (Cons) 아무래도 스켈레톤을 화면마다 표시해야 되기 때문에 상대적으로 시간이나 비용이 많이 든다. 스켈레톤 컴포넌트 사용 예시 페이스북 링크드인 구글 드라이브 유튜브 더 나은 경험을 위한 스켈레톤 규칙 스켈레톤은 콘텐츠의 로드를 방해하면 안.. 2022. 2. 26.
패스트캠퍼스 챌린지 33일차 (Next.js 실제6) 22.2.25 (금) +33days Upgrade Guide https://nextjs.org/docs/upgrading 12 버전까지... 12버전 오픈과 함께 Upgrade Guide를 제공한다. Migrating to Next.js Incrementally Adopting Next.js https://nextjs.org/docs/migrating/incremental-adoption Migrating from Gatsby https://nextjs.org/docs/migrating/from-gatsby Migrating from Create React App https://nextjs.org/docs/migrating/from-create-react-app Migrating from React Ro.. 2022. 2. 25.
패스트캠퍼스 챌린지 32일차 (Next.js 실제5 - Debugging 외) 22.2.24 (목) +32days Debugging https://nextjs.org/docs/advanced-features/debugging Debugging with VS Code Create a file named .vscode/launch.json at the root of your project with the following content: { "version": "0.2.0", "configurations": [ { "name": "Next.js: debug server-side", "type": "node-terminal", "request": "launch", "command": "npm run dev" }, { "name": "Next.js: debug client-side", ".. 2022. 2. 24.
패스트캠퍼스 챌린지 31일차 (Next.js 실제4 - Custom) 22.2.23 (수) +31days Custom Server https://nextjs.org/docs/advanced-features/custom-server 커스텀을 하면 Next.js의 장점을 살리기 어려움 Custom `App` https://nextjs.org/docs/advanced-features/custom-app 페이지들의 공통화 pages/_app.js Persisting layout between page changes / Keeping state / Global style getInitialProps를 여기서 사용하면 모든 페이지는 Static Optimization X getStaticProps와 getServerSideProps는 지원 X // import App from 'ne.. 2022. 2. 23.
패스트캠퍼스 챌린지 30일차 (Next.js 실제3 - AMP, Babel 등) 22.2.22 (화) +30days AMP Support With Next.js you can turn any React page into an AMP page, with minimal config, and without leaving React. Accelerated Mobile Pages 가속화된 모바일 페이지 amp.dev Enabling AMP To enable AMP support for a page, and to learn more about the different AMP configs, read the API documentation for next/amp. Caveats • Only CSS-in-JS is supported. CSS Modules aren't supported by AMP.. 2022. 2. 22.
패스트캠퍼스 챌린지 29일차 (Next.js 실제2) 22.2.21 (월) +29days Authentication https://nextjs.org/docs/authentication 인증 패턴 클라이언트 사이드에서 인증: 로딩 상태 있음 서버 사이드에서 인증: 인증될때까지 block iron / next-auth / passport.js next-auth example https://github.com/nextauthjs/next-auth-example Testing Cypress Cypress is a test runner used for End-to-End (E2E) and Integration Testing. Playwright Playwright is a testing framework that lets you automate Chromium, .. 2022. 2. 21.
패스트캠퍼스 챌린지 28일차 (Next.js 실제1 - Deploy) 22.2.20 (일) +28days Production 실제로 서비스를 배포하기 전에 고려해야 할 부분들 https://nextjs.org/docs/going-to-production In General Use caching wherever possible. Ensure your database and backend are deployed in the same region. Aim to ship the least amount of JavaScript possible. Defer loading heavy JavaScript bundles until needed. Ensure logging is set up. Ensure error handling is set up. Configure the 404 (Not.. 2022. 2. 20.
패스트캠퍼스 챌린지 27일차 (Next.js 심화3) 22.2.19 (토) +27days Routing https://nextjs.org/docs/routing/introduction Next.js has a file-system based router built on the concept of pages. When a file is added to the pages directory, it's automatically available as a route. The files inside the pages directory can be used to define most common patterns. Dynamic Routes https://nextjs.org/docs/routing/dynamic-routes Defining routes by using p.. 2022. 2. 19.
패스트캠퍼스 챌린지 26일차 (Next.js 심화2) 22.2.18 (금) +26days Layouts https://nextjs.org/docs/basic-features/layouts 모든페이지에 공통으로 존재 하는 페이지는 Layout으로 빼놓는다. 여러 Layout들을 사용할때는 Page.getLayout 활용 가능 Per-Page Layouts 멀티 layouts를 사용할 때는 getLayout 을 사용한다. Data Fetching layout 안에서는 useEffect 나 SWR을 사용할 수 있다. Page가 아니기 때문에 getStaticProps 또는 getServerSideProps를 사용할 수 없다. // components/layout.js import useSWR from 'swr' import Navbar from './navbar.. 2022. 2. 18.
패스트캠퍼스 챌린지 25일차 (Next.js 심화1) 22.2.17 (목) +25days Next.js는 프레임워크다. 다양한 도구들의 모음이다. 따라서 API가 꽤나 많다. 다 알 필요는 없지만, 일반적인 기능은 모두 살펴보고, 심화 기능들은 읽어라도 보자. 공식문서로 보는 Pages https://nextjs.org/docs/basic-features/pages Basic Features: Pages | Next.js Next.js pages are React Components exported in a file in the pages directory. Learn how they work here. nextjs.org Pages In Next.js, a page is a React Component exported from a .js, .jsx, .t.. 2022. 2. 17.
패스트캠퍼스 챌린지 24일차 (Next.js 기본3) 22.2.16 (수) +24days Dynamic Routes https://nextjs.org/learn/basics/dynamic-routes Learn | Next.js Production grade React applications that scale. The world’s leading companies use Next.js by Vercel to build pre-rendered applications, static websites, and more. nextjs.org getStaticPaths / remark / dynamic routes /posts 하위에 md 파일이 있을 때 해당 페이지를 statically generating 한다. https://nextjs.org/learn/bas.. 2022. 2. 16.
패스트캠퍼스 챌린지 23일차 (Next.js 기본2) 22.2.15 (화) +23days https://nextjs.org/learn/basics/data-fetching Learn | Next.js Production grade React applications that scale. The world’s leading companies use Next.js by Vercel to build pre-rendered applications, static websites, and more. nextjs.org Pre-rendering hydration: 페이지가 브라우저에 로드되고 자바스크립트 코드가 실행되면서 페이지가 인터랙티브하게 동작할 상태가 되는 과정 Next.js는 기본적으로 모든 페이지를 pre-rendering 한다. disable javascri.. 2022. 2. 15.
반응형