Skip to Content
๋ ˆ์‹œํ”ผNext App Router

Next App Router Recipe

examples/next-app-router๋Š” @inkio/editor ๊ธฐ์ค€ ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

์ ํ•ฉํ•œ ๊ฒฝ์šฐ:

  • notion-like editor
  • Next.js App Router
  • comments์™€ image editor๋ฅผ ํ•จ๊ป˜ ์“ฐ๋Š” ๊ฒฝ์šฐ

์‹คํ–‰:

pnpm install pnpm --filter example-next-app-router dev

ํ•ต์‹ฌ ํฌ์ธํŠธ:

  • editor๋Š” client component ์•ˆ์—์„œ ๋ Œ๋”๋ง
  • ์„œ๋ฒ„ route ์•ˆ์—์„œ๋„ hard refresh ์‹œ static ๋ฌธ์„œ HTML์ด ๋จผ์ € ๋ณด์ด๊ณ , hydration ํ›„ interactive editor๋กœ ์ „ํ™˜๋จ
  • Viewer๋Š” static HTML ๊ธฐ๋ฐ˜์ด๋ผ SSR/CSR ๋ชจ๋‘ ๊ฐ™์€ ๊ณ„์•ฝ์œผ๋กœ ๋™์ž‘
  • @inkio/editor/minimal.css, @inkio/image-editor/style.css import
  • transpilePackages์— @inkio/editor, @inkio/advanced, @inkio/image-editor ์ถ”๊ฐ€
  • image editor ๊ฐ™์€ ๋ฌด๊ฑฐ์šด ํ™•์žฅ์€ lazy component๋กœ ๋„˜๊ฒจ ์ดˆ๊ธฐ ๋ณธ๋ฌธ ๋ Œ๋”๋ฅผ ๋ง‰์ง€ ์•Š๊ฒŒ ๊ตฌ์„ฑ
Last updated on