Exporting the Higher-Order Component

Let's use the higher-order component from the previous lesson to protect our routes.

We'll cover the following

In the previous lesson, we discussed how to redirect a user based on authorization using a higher-order component. We must remember to export the higher-order component from the session module into the src/components/Sessions/index.js file:

Get hands-on with 1400+ tech skills courses.