I'm doing an example practice of how to connect react with redux and an external api to consume data. By console in the payload I print correctly all the objects of the api but I can not paint it in the view. Any ideas?
I share a gist so you can see the example and it may be failing
I also share an image so that you see that in console if it shows the objects of the api
Looks like you're not passing action.payload
on your LOAD_EXAMPLE_API reducer.
//reducer
export default function apiExampleReducer(state = initialState.examples, action) {
switch (action.type) {
case LOAD_EXAMPLE_API:
return {
examples: action.payload,
error: null,
loading: false,
};
...
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.