1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Add redux-observable to an existing Redux project

    Shane OsbourneShane Osbourne
    redux-observableredux-observable
    reduxRedux

    In this lesson we’ll learn exactly what’s needed to incorporate redux-observable into an existing React/Redux application. We’ll learn what ‘Epics’ are, how to register & combine them - and finally how to create the Redux Middleware that ties it all together

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss

    Transcript

    Transcript

    Instructor: Go to this GitHub repo and select the appropriate installation method for your browser. Once you have the extension, as I do here, we need to look for the code that will enable it. We need the advanced store setup since we are using other middleware. We can copy this line. Inside our configure store area, we can paste that line in.

    What this is doing is it's looking if the DevTools extension is available on the window. If it isn't, we'll fall back to this compose method. We need to import this from Redux. Then we simply wrap the call to applyMiddleware in the call to composeEnhancers. Go back to the browser.

    Now you can see this has gone green. If you don't see it as a separate tab, you may need to close DevTools and reopen it. Then you can see we have this Redux panel. Now we can see a log of all of the actions that occur in our application.