saga-demo | Saga Pattern demo - Slides are available at http : //bit
kandi X-RAY | saga-demo Summary
kandi X-RAY | saga-demo Summary
Slides are available at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Reserve a room
- Process a reservation command
- Cancel a reservation
- Confirms a room
- Reserves a room
- The main method
- Process a transaction
- Deserialize the object
- Delegate to transaction
- Initialize database
- Serialize a topic to a byte array
- Perform an existing transaction
saga-demo Key Features
saga-demo Examples and Code Snippets
Community Discussions
Trending Discussions on saga-demo
QUESTION
I'm very new to redux-saga and am trying to get a simple demo working that makes an API call and sends the response data to a reducer so it can be saved to the store. It is my understanding that the redux-saga flow should work as follows.
- A component calls an action creator
- The action creator then emits an action using a specific type
- The watcher sagas all listen for any actions emitted and intercept an action that it is listening for. It then calls the appropriate worker saga.
- The worker saga makes an API call and dispatches an action to the reducers with the type of action and the payload.
- The reducer listens for any dispatched actions and if it matches, it then uses the supplied data to update the state in the store.
I have laid out my code to follow that flow but things aren't working quite right. Let me show my code and then i'll elaborate on the problem.
components/PostsIndex.js
ANSWER
Answered 2017-Oct-23 at 05:34Sagas do not stop actions from reaching the reducers. The saga middleware explicitly does the equivalent of:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install saga-demo
You can use saga-demo like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the saga-demo component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page