We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another FAQ is using HTTP to fetch data so it would be good to add a 'Fetcher' component as a 3rd page.
Some code suggestions (assuming JSON payload)
const request$ = action$.map(accessToken => ({ url: <API_CALL>, method: 'get', category: 'request' })) const response$$ = HTTP.select('request-photos') const photos$ = response$$ .map(response$ => response$.replaceError((error: any) => { return xs.of( error.response ? error.reponse : { error, body: {} } ) }) ) .flatten() .map<Reducer>(({ error, body }) => state => ({ ...state, error: error.message, body })) function view(state$: Stream<State>): Stream<VNode> { return state$ .map(state => (state.error ? state.error : state.body)) .map(result => <div> <div className="result"> {result} </div> </div> ) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Another FAQ is using HTTP to fetch data so it would be good to add a 'Fetcher' component as a 3rd page.
Some code suggestions (assuming JSON payload)
The text was updated successfully, but these errors were encountered: