Core: learn it Step 12 of 16 on the Full-Stack Developer roadmap
Protected pages in React
Hide pages and buttons a user cannot use, and send them to the login page when a request returns 401. This only improves the experience; the server must still refuse forbidden actions.