Test it!
Play with it! Change the isAuth
prop and you'll be automatically redirected to your public or private routes. Also you'll notice:
- ๐คฏ
0
flashy content! - ๐ค You have all setup in one place!
- ๐ Avoid to write repetitive code like:
router.push(route)
after a sign in or sign out operations, delegate. - ๐ฅณ You don't need to write code to handle public or private routes anymore!