课程: React: Creating and Hosting a Full-Stack Site (2022)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Build a create-account page
- All right. So now that we've added a custom hook for keeping track of our users off state and we've added a little bit of logic to our article page to change the structure of the page depending on whether the user is logged in or not. The next thing that we're going to do is allow users that don't have an account yet to create an account by going into the create account page and implementing it. So let's open up our create account page. And the good news here is that a lot of this is going to be pretty repetitive from the login page. So if you want what you can actually do is copy a lot of this code and I'm just going to copy the top two imports here use state link and use navigate. We're going to paste those up here in the create account page. Like, so, and then we're going to copy the state variables here. So email, password, and error, and we're going to paste those in our create account page as well. And actually…
内容
-
-
-
-
-
-
-
Why Firebase Auth?1 分钟 17 秒
-
(已锁定)
Creating a Firebase project4 分钟 16 秒
-
(已锁定)
Adding Firebase Auth to React9 分钟 27 秒
-
(已锁定)
Build a login form11 分钟 56 秒
-
(已锁定)
Creating a custom auth hook8 分钟 52 秒
-
(已锁定)
Build a create-account page7 分钟 59 秒
-
(已锁定)
Adding Firebase Auth to Node.js6 分钟 25 秒
-
(已锁定)
Protecting endpoints using auth-tokens8 分钟 44 秒
-
(已锁定)
Protecting the upvote and comment endpoints4 分钟 47 秒
-
(已锁定)
Making requests with auth tokens6 分钟 41 秒
-
(已锁定)
Making interface adjustments for authenticated users6 分钟 34 秒
-
-
-