๋ฐ˜์‘ํ˜•

error 3

[React] Warning: Failed prop type: Invalid prop checked of type string supplied to ..., expected boolean. Warning ๋ฐœ์ƒ ๋ฐ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

Intro์•ˆ๋…•ํ•˜์„ธ์š”. react ์‚ฌ์šฉ ์ค‘ ๋‹ค์Œ์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. Warning: Failed prop type: Invalid prop checked of type string supplied to ..., expected boolean.  Why?const MemoizedCheckbox: React.FC = React.memo(({ checked, onChange, value }) => { return })... } label={data} labelPlacement='end' /> ์˜ค๋ฅ˜์˜ ์›์ธ์€ MemoizedCheckbox ์ปดํฌ๋„ŒํŠธ์˜ checked prop์— ๋ฌธ์ž์—ด ํƒ€์ž…์ด ์ „๋‹ฌ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. checked prop์€ boolean ํƒ€์ž…์„ ๊ธฐ๋Œ€ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ๋ฌธ์ž์—ด์ด ์ „..

Framework/React 2024.07.15

[Kotlin] Error: Non-terminating decimal expansion; no exact representable decimal result. ์˜ค๋ฅ˜

Intro kotlin ๊ธฐ๋ฐ˜์˜ ์กฐํšŒ API๋ฅผ ๋งŒ๋“ค๋˜ ๋„์ค‘ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. Non-terminating decimal expansion; no exact representable decimal result. Why? ๊ฐ’์„ ๊ตฌํ•˜๊ธฐ ์œ„ํ•ด divide๋ฅผ ํ†ตํ•ด ๋‘ BigDecimal ๊ฐ’์„ ๋‚˜๋ˆ ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. ๋ถ„๋ช… ์—๋Ÿฌ๊ฐ€ ์—†์—ˆ๋Š”๋ฐ, ์™œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋Š”์ง€ ๊ตฌ๊ธ€๋ง์„ ํ•˜์—ฌ ๊ฒ€์ƒ‰ํ•ด๋ดค์Šต๋‹ˆ๋‹ค. BigDecimal ๋‚˜๋ˆ„๊ธฐ๋ฅผ ํ•  ๊ฒฝ์šฐ ์ •ํ™•ํ•œ ๊ฐ’์ด ๋–จ์–ด์ง€์ง€ ์•Š์œผ๋ฉด ๋‹ค์Œ์˜ "Non-terminating decimal expansion; no exact representable decimal result." ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ํ…Œ์ŠคํŠธ ํ•˜๋˜ ๋ฐ์ดํ„ฐ์—์„œ๋Š” ์ •ํ™•ํžˆ ๊ฐ’์ด ๋–จ์–ด์ ธ ๋‚˜๋ˆ ์กŒ๊ธฐ ๋•Œ๋ฌธ์— ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์•˜..

Programming/Kotlin 2023.01.02

[Next.js] Error: The default export is not a React Component in page: "/" ์˜ค๋ฅ˜

Intro next js ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๋„์ค‘ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค. Error: The default export is not a React Component in page: "/" Why? ์—๋Ÿฌ๊ฐ€ ๋‚œ ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•ด๋ณด๋‹ˆ, export ๋งŒ ํ•˜๊ณ  default ๋ฅผ ์ ์–ด์ฃผ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. Next.js์—์„œ๋Š” default๋กœ export๋ฅผ ํ•ด์•ผ ์—๋Ÿฌ ์—†์ด ์ •์ƒ ์ž‘๋™ ๋˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. export function HomePAge() { const featuredEvents = getFeaturedEvents(); return ( ); } How to solve the problem export default ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๐Ÿ™Œ export default function HomePAge() { ..

Framework/Next.js 2022.11.08
๋ฐ˜์‘ํ˜•