MCPcopy
hub / github.com/reduxjs/redux / fetchUser

Function fetchUser

examples/real-world/src/actions/index.js:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7// Fetches a single user from Github API.
8// Relies on the custom API middleware defined in ../middleware/api.js.
9const fetchUser = login => ({
10 [CALL_API]: {
11 types: [ USER_REQUEST, USER_SUCCESS, USER_FAILURE ],
12 endpoint: `users/${login}`,
13 schema: Schemas.USER
14 }
15})
16
17// Fetches a single user from Github API unless it is cached.
18// Relies on Redux Thunk middleware.

Callers 1

loadUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected