Redux useSelector returns undefined

New to redux and just having difficulty working out how to access my state on line 52. useSelector is just returning undefined. Bit lost ngl. https://codepen.io/nwoodward/pen/vYVaQyW?editors=0011

const favouritesList = useSelector((state) => {
console.log(state) // undefined
return state.favourites;
});

const favouritesList = useSelector((state) => {
console.log(state) // undefined
return state.favourites;
});
nick
CodePen
Redux tk
...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server