Using Redux to fetch an API, but return is undefined?
The below code uses Redux to display an array using createApi
and fetchBaseQuery
. The problem I am having is that when the program attempts to map
over the data, it returns an error saying that “players
(in Players.jsx
) is undefined”. Being new to React and Redux, I can’t tell if the problem is coming from how I implemented the createApi
or if it is just a syntax error somewhere.
Why is my `amount` reading as undefined from my `createSlice`?
I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux
functions.
How is my useDispatch hook set up incorrectly here?
I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux
functions.