๐ŸšงFast Refresh had to perform a full reload.๐Ÿšง

ํ˜œํ˜œยท2023๋…„ 12์›” 4์ผ
0

Error Note

๋ชฉ๋ก ๋ณด๊ธฐ
13/19

โ—๋ฌธ์ œ ๋‚ด์šฉ

Fast Refresh๋Š” React ์ปดํฌ๋„ŒํŠธ๋“ค์ด ํŽธ์ง‘๋˜์—ˆ์„ ๋•Œ ์ฆ‰๊ฐ์ ์ธ ํ”ผ๋“œ๋ฐฑ์„ ํ•ด ์ฃผ๋Š” Next.js์˜ ๊ธฐ๋Šฅ์ด๋‹ค. React ์ปดํฌ๋„ŒํŠธ๋“ค๋งŒ export ํ•˜๋Š” ๊ฒฝ์šฐ, Fast Refresh๋Š” ํ•ด๋‹น ํŒŒ์ผ์˜ ์ฝ”๋“œ๋งŒ ์—…๋ฐ์ดํŠธํ•˜๊ณ , ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋‹ค์‹œ ๋ Œ๋”๋ง ํ•œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์ด Fast Refresh๊ฐ€ full reload๋ฅผ ์ดˆ๋ž˜ํ•ด์„œ ํ† ํฐ ๊ด€๋ จ ๋กœ์ง์„ ์ œ๋Œ€๋กœ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์—†๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.

โš’๏ธ ๋ฌธ์ œ ํ•ด๊ฒฐ

๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์€ ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€์— ํ•จ๊ป˜ ๋‚˜์˜ค๋Š” next.js ๊ณต์‹ ๋ฌธ์„œ ๋งํฌ๋ฅผ ์‚ดํŽด๋ณด๋ฉด ์นœ์ ˆํ•˜๊ฒŒ ๋‚˜์™€ ์žˆ๋‹ค. ์ด ์˜ค๋ฅ˜๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ด์œ ๋กœ ๋‚˜ํƒ€๋‚  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.

  • ํŽธ์ง‘ ์ค‘์ธ ํŒŒ์ผ์ด React ์ปดํฌ๋„ŒํŠธ ์™ธ์— ๋‹ค๋ฅธ ๊ฒƒ์„ export ํ•˜๊ณ  ์žˆ๋Š” ๊ฒฝ์šฐ
  • React ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์ต๋ช… ํ•จ์ˆ˜์ธ ๊ฒฝ์šฐ
  • React ํ•จ์ˆ˜์˜ ์ด๋ฆ„์ด PascalCase๊ฐ€ ์•„๋‹Œ camelCase๋กœ ๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ

๋‚ด ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ 3๋ฒˆ์ด ๋ฌธ์ œ์˜€๋‹ค... ๋ฌธ์„œ์—์„œ๋Š” ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•๋„ ํ•จ๊ป˜ ์ œ๊ณตํ•œ๋‹ค.

  • export๋ฅผ ๋ถ„๋ฆฌ๋œ ํŒŒ์ผ๋กœ ์˜ฎ๊ธฐ๊ธฐ
  • React ์ปดํฌ๋„ŒํŠธ์— named ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ
  • ์ปดํฌ๋„ŒํŠธ ์ด๋ฆ„์„ PascalCase๋กœ ์ˆ˜์ •ํ•˜๊ธฐ

๐Ÿ™‡โ€โ™‚๏ธ ์ฐธ๊ณ ์ž๋ฃŒ

Fast Refresh had to perform full reload

profile
์‰ฝ๊ฒŒ๋งŒ์‚ด์•„๊ฐ€๋ฉด์žฌ๋ฏธ์—†์–ด๋น™๊ณ 

0๊ฐœ์˜ ๋Œ“๊ธ€