-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot destructure property 'product' of '(0 , react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(...)' as it is undefined. #70
Comments
Bro problem is simple. give the proper path and state name which is used in redux. you provided the wrong path and try to pull the product using useSelector. |
import { Box, Button, Container, Grid, Typography } from "@mui/material"; const SingleProduct = () => { const dispatch = useDispatch(); useEffect(() => { useEffect(() => {
}, [dispatch, id]); const handleDecrease = () => { const handleIncrease = () => { const addToCart = () => {
); export default SingleProduct; i have same issue |
had this error quite many time, everytime it was in store.js either their was improper import of reducer, syntax error of reducer by me |
Cannot destructure property 'product' of '(0 , react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(...)' as it is undefined.
anyone have solved this error ???? if yes please share the solution
The text was updated successfully, but these errors were encountered: