๐Ÿ‘€ Suspensive v2์—์„œ์˜ ๋ณ€๊ฒฝ์„ ํ™•์ธํ•˜์„ธ์š”. ๋”๋ณด๊ธฐ โ†’
๋ฌธ์„œ๋ณด๊ธฐ@suspensive/react<ClientOnly/>

ClientOnly

์ด ์ปดํฌ๋„ŒํŠธ๋Š” ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ์—์„œ๋งŒ children์„ ๋ Œ๋”๋งํ•˜๋ฉฐ, ์„œ๋ฒ„์—์„œ๋Š” fallback์„ ๋ Œ๋”๋งํ•ฉ๋‹ˆ๋‹ค. ํ•„์š”์— ๋”ฐ๋ผ ์ ์ ˆํ•œ fallback์„ ์„ค์ •ํ•˜์—ฌ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ํ–ฅ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

import { ClientOnly } from '@suspensive/react'
 
const Example = () => (
  <ClientOnly fallback={<>๋กœ๋”ฉ ์ค‘...</>}>
    <div>ํด๋ผ์ด์–ธํŠธ ํ™˜๊ฒฝ์—์„œ๋งŒ ๋ Œ๋”๋ง ๋ฉ๋‹ˆ๋‹ค.</div>
  </ClientOnly>
)