Creating An API Dependency
Life Without an API Dependency
Repetition
fetch(`https://api.github.com/users/${username}`)
.then(response => response.json())
.catch(error => console.error(error))const aperture = component =>
component.observe('username').pipe(
mergeMap(username =>
fromPromise(
fetch(`https://api.github.com/users/${username}`)
.then(response => response.json())
.catch(error => ({ type: RECEIVE_ERROR, error }))
)
)
)Flexibility
Testability
Request Cancellation
The Solution
Considerations
Using Your API Dependency Outside Refract
Runtime Configuration
Last updated