PostDetail.jsx:149 Uncaught TypeError: prev is not iterable
at PostDetail.jsx:149:1
at basicStateReducer (react-dom.development.js:16540:1)
at updateReducer (react-dom.development.js:16664:1)
at updateState (react-dom.development.js:17004:1)
at Object.useState (react-dom.development.js:17915:1)
at useState (react.development.js:1622:1)
at PostDetail (PostDetail.jsx:26:1)
at renderWithHooks (react-dom.development.js:16305:1)
at updateFunctionComponent (react-dom.development.js:19588:1)
at beginWork (react-dom.development.js:21601:1)
The above error occurred in the <PostDetail> component:
at PostDetail (http://localhost:60971/static/js/bundle.js:7315:80)
at RenderedRoute (http://localhost:60971/static/js/bundle.js:50257:5)
at Outlet (http://localhost:60971/static/js/bundle.js:50595:26)
at RenderedRoute (http://localhost:60971/static/js/bundle.js:50257:5)
at Routes (http://localhost:60971/static/js/bundle.js:50680:5)
at Router (http://localhost:60971/static/js/bundle.js:50618:15)
at BrowserRouter (http://localhost:60971/static/js/bundle.js:48965:5)
at Router
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.