So we're newly introduced to redux in our course and i'm using graphCMS so we can create products and fetch that data by queries. But, when we got introduced to redux and access the data more easily instead of passing props all over, it doesn't work with calling queries. Been trying different things today by myself and trying to google, but i can't really find any solution. Here's my code right now, code
And this code will produce: output , so the empty array is when i refresh/run the program and when i click "Get Data" i just get "$$typeof: Symbol(react.element), key: null, ref: null, props: {…}, type: ƒ, …}" so it does happen something.. but no data in it as expected from graphCMS.
I've realized that it doesn't even reach the code inside at all (by trying to run console.log("string") for example).
Here's my app.js which calls the console.log from the state. app.js
Any ideas how i can get this out as the objects i want, is it possible? This does work otherwise, but not in redux/reducer.
Best regards, newbie