<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>React-Router on BradCypert.com</title>
    <link>https://www.bradcypert.com/tags/react-router/</link>
    <description>Recent content in React-Router on BradCypert.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 30 Mar 2023 22:45:17 -0400</lastBuildDate>
    <atom:link href="https://www.bradcypert.com/tags/react-router/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Auth Guarding React Router Routes</title>
      <link>https://www.bradcypert.com/auth-guarding-react-router-routes/</link>
      <pubDate>Sun, 27 Oct 2019 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/auth-guarding-react-router-routes/</guid>
      <description>&lt;p&gt;A common theme in web applications is to serve specific content to authenticated users while serving other content to everyone else. I’ve heard this referred to in the past as “auth guarding” specific content. In this case of our example today, we want to auth guard react-router routes.&lt;/p&gt;&#xA;&lt;p&gt;There are a couple of different ways to do this, but I’ve found a pattern that I really like that uses higher-order function components to help create the functionality that would be expected of an auth guarded route. Namely, we show them an unauthorized screen if they’re not authorized and, if they are authorized to view that content, we show them the content.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
