Skip to content

Commit b6e3da8

Browse files
committed
updated README.md
1 parent 7aae591 commit b6e3da8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
This proof-of-concept has been heavily inspired by a [blog post](https://kentcdodds.com/blog/authentication-in-react-applications) I read by Kent C. Dodds (which I encourage you to go and read also). What this application does is checks to see if the current user is authenticated. If they are not, then they are restricted access to routes specifically for authenticated users.
88

9-
I have achieved this by wrapped the `<App />` component in a couple of providers. Firstly the `<AuthProvider />` is responsible for bootstrapping the app data. Then secondly the `<UserProvider />` is responsible for keeping the user data up to date in memory.
9+
I have achieved this by wrapping the `<App />` component in a couple of react providers. Firstly the `<AuthProvider />` is responsible for bootstrapping the app data. Then secondly the `<UserProvider />` is responsible for keeping the user data up to date in memory.
1010

1111
The `<App/ >` component will render the `<UnauthenticatedApp />` component until the current users data is retrieved. Once that data has been fulfilled it is determined that the user is logged in and the `<AuthenticatedApp />` component will be rendered instead. It will be literally impossible to render one side of the app or the other if there is no user.
1212

0 commit comments

Comments
 (0)