score:2
Accepted answer
based on this tutorial i think that timeout has to be directly below frompromise
:
const fetchingepic = (action$, store) =>
action$
.oftype('fetch_data')
.mergemap(() =>
frompromise(
axios.post(`/url`, payload)
)
.timeout(5000)
.map(response => ({
type: 'fetch_data_success',
data: response.data
}))
.catch(error =>
observable.of({
type: 'fetch_data_error',
error
})
)
);
Source: stackoverflow.com
Related Query
- Where to put timeout operator in Redux Observable fetching epic
- React observable epic with Redux Toolkit and Typescript
- You provided `undefined` where a stream was expected in Redux Observable
- Redux observable epic with Rxjs issue
- Where should I put my logic for initializing state in a Redux application
- Creating a Redux Observable Epic with multiple API Calls - Passing the results of the first into the second
- How to emit two actions for ajax response in redux observable epic
- Cannot do routing within Redux Observable epic
- how to get axios.get data and where to put it in redux reducer initial state
- Where to put javascript functionality when certain Redux actions are thrown?
- Where should I put my dispatch in lifecycle react redux
- Where to put persistedState in Create-Store for saving redux store into localStorage
- How to show a loading indicator in React Redux app while fetching the data?
- Where do I fetch initial data from server in a React Redux app?
- How to put methods onto the objects in Redux state?
- Where to put utility functions in a React-Redux application?
- Where should I handle sorting in Redux App?
- Where do I put coding logic in my React Application
- Where do long-running processes live in a React + Redux application?
- Where should I put images files in React project?
- What are the cases where Redux dispatch could change?
- Where to store WebRTC streams when building React app with redux
- Where to put enums in my react application
- Where to set cookie in Isomorphic Redux Application?
- Where to put API calls in React/Redux architecture?
- Where to put all the screens which are common in multiple stack navigators? - React Navigation v5
- Firebase phone sign-in, where to put firebase recaptcha code?
- the spread operator in Redux reducer
- Where to put SignalR hub in React/Redux app?
- React: Where to put API call to be made on state change
More Query from same tag
- How to resoslve this error?
- html.js loading the script only once on page load Gatsby
- Media Queries in styled components are changing by themselves
- Inline style based off JSON value React
- How to make Snackbar open again?
- TypeScript 3: property is missing in type
- Routes being cached by service worker in react
- React Hook "useEffect" cannot be called inside a callback error occurs
- If props is missing Should I use memo?
- How to properly type the theme passed as prop to the styled() method on Material UI? (TypeScript)
- remove circles from google map react
- Make API call with argument set in useState just before it
- Webpack not working in my node.js project. fsevents
- how to Open a modal inside of a response async?
- React wait until set state in the same function
- React, onClick callback arguments
- React Conditional Update of a List
- React + Docker + Nginx
- Redirecting with react-router in a react redux app
- Type Safe Redux Reducer with Arguments
- error: websocket.js:84 WebSocket connection to 'ws://localhost:5000/socket.io/?EIO=4&transport=websocket' failed:
- ReactJS how to wait for all API calls to be ended in componentDidMount of simple component
- Add sub-routine for Office.js Javascript Word add-in using asynchronous execution context
- My repository is using CI/CD, but I have this error. How can I fix it?
- React Child Component Not Rendering
- React Test Utils - Spy not called when a simulated click is performed -
- React: hiding vs removing components
- Render SVGSVGElement in React JS without dangerouslySetInnerHtml
- progressive web app site cannot be installed: no icon available to display
- How do I deselect an active list item when I click on/activate another one?