Code problem spoted on the new React Authentication By Example: Using React Router 6

On the “Add Route Guards to React” part,

the code to copy/paste reads like this(and it does not work):

<Route
    path="/profile"
    element={<AuthenticationGuard component={<ProfilePage />} />}
  />

Switched it to(it now works):

  <Route
    path="/profile"
    element={<AuthenticationGuard component={ProfilePage} />}
  />

–The problem is the < /> inside the { }

Perfect highlighting the trick here then:

<Route
    path="/profile"
    element={<AuthenticationGuard component={ProfilePage} />}
  />

Can you share a link to the doc where the issues is?

Perfect! I’ll ping the team to change it