Summary
In this chapter, we explored routing and authenticated experiences. We reminded ourselves of how routing works in React and created private routes for use with @reach/router
. Then, we ported this knowledge into Gatsby and created a private page that was only accessible by logging in. Finally, we investigated how we can use context to wrap our whole application in authentication for situations that require it.
In the next chapter, we will learn about another advanced concept – how to use sockets to create experiences that make use of real-time data.