ProNextJS
    Loading
    exercise

    Add a Review Slice to the Redux Store

    Jack HerringtonJack Herrington

    We have our cart functionality being driven by a Redux store, but now it's time to get a little bit tricky and bring in the reviews functionality.

    Challenge

    Your challenge is to update the Redux store to include a reviews slice that is initialized with product reviews.

    As you're working through this, watch for how the reviews change as you change product routes by clicking different t-shirts.

    Also, double check the server-side rendered output of the page to make sure the reviews are coming through. Remember, this is important for SEO so they need to be there.

    Revisit the Redux examples in the previous lesson if you need to!

    Transcript

    All right, so this is where it really starts to get fun. Now, we're driving our cart functionality using a Redux store. Let's see if we can implement on the reviews functionality. This is where it's going to start to get really tricky. So one of the things you need to watch out for as you're implementing is when you change routes,

    notice how the reviews are changing to the reviews for that particular product. That's really important. So as you're working through this, make sure that that works. Also, go and check out the server-side rendered output of the page so that you make sure that you're

    getting the reviews in the server-side rendered output. You want to make sure that they're in there because a requirement for an app like this is to have the reviews in the server-side rendered output. That's going to make for great search engine optimization or SEO. Now, if you have any questions,

    be sure to consult the resources. In the meantime, good luck on this mystery of figuring out the best way to initialize the reviews slice within our Redux store properly.