Diskusi ARI RIZKITA, S.Kom

ARI RIZKITA, S.Kom
Ditanyakan pada: Mengembalikan Value ke Parent melalui Props

Error

saya dapat error ini gan. index.tsx:17 Uncaught ReferenceError: posts is not defined at homePage (index.tsx:17:10) at renderWithHooks (react-dom_client.js?v=ac694715:12169:26) at mountIndeterminateComponent (react-dom_client.js?v=ac694715:14919:21) at beginWork (react-dom_client.js?v=ac694715:15900:22) at HTMLUnknownElement.callCallback2 (react-dom_client.js?v=ac694715:3672:22) at Object.invokeGuardedCallbackDev (react-dom_client.js?v=ac694715:3697:24) at invokeGuardedCallback (react-dom_client.js?v=ac694715:3731:39) at beginWork$1 (react-dom_client.js?v=ac694715:19759:15) at performUnitOfWork (react-dom_client.js?v=ac694715:19192:20) at workLoopSync (react-dom_client.js?v=ac694715:19131:13) index.tsx:17 Uncaught ReferenceError: posts is not defined at homePage (index.tsx:17:10) at renderWithHooks (react-dom_client.js?v=ac694715:12169:26) at mountIndeterminateComponent (react-dom_client.js?v=ac694715:14919:21) at beginWork (react-dom_client.js?v=ac694715:15900:22) at HTMLUnknownElement.callCallback2 (react-dom_client.js?v=ac694715:3672:22) at Object.invokeGuardedCallbackDev (react-dom_client.js?v=ac694715:3697:24) at invokeGuardedCallback (react-dom_client.js?v=ac694715:3731:39) at beginWork$1 (react-dom_client.js?v=ac694715:19759:15) at performUnitOfWork (react-dom_client.js?v=ac694715:19192:20) at workLoopSync (react-dom_client.js?v=ac694715:19131:13) @react-refresh:247 The above error occurred in the component:

at homePage (http://localhost:5173/src/pages/index.tsx?t=1712116642882:25:28)
at div
at App

Consider adding an error boundary to your tree to customize error handling behavior. Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries. @react-refresh:278 Uncaught ReferenceError: posts is not defined at homePage (index.tsx:17:10) at renderWithHooks (react-dom_client.js?v=ac694715:12169:26) at mountIndeterminateComponent (react-dom_client.js?v=ac694715:14919:21) at beginWork (react-dom_client.js?v=ac694715:15900:22) at beginWork$1 (react-dom_client.js?v=ac694715:19747:22) at performUnitOfWork (react-dom_client.js?v=ac694715:19192:20) at workLoopSync (react-dom_client.js?v=ac694715:19131:13) at renderRootSync (react-dom_client.js?v=ac694715:19110:15) at recoverFromConcurrentError (react-dom_client.js?v=ac694715:18730:28) at performSyncWorkOnRoot (react-dom_client.js?v=ac694715:18873:28)

berikut code saya https://chat.openai.com/c/c37a0cbc-6019-4d09-a15c-aec601ac6235

2 Jawaban

Avatar
Muhammad Fakhry Burhanuddin

20 hari yang lalu

Untuk kodenya tolong dishare pakai github ya kak. Dan untuk bahasa pemrograman gunakan JavaScript, bukan TypeScript.

Avatar
BroKoding

20 hari yang lalu

Halo kak, error nya mengindikasi object posts tidak dikenali oleh homepage. Coba cek lagi penggunaan object tersebut, termasuk property yang lain juga ya kak.