Advanced Session Management
Session management is crucial to building good user experiences. Persisting session data can increase the user’s experience and productivity by remembering user settings, selections, and preferences.
We learned how to manage user sessions in Chapter 8, Session Management. In this chapter, we will work on advanced session management patterns.
This chapter is split into two sections:
- Managing visitor sessions
- Implementing pagination
First, we will implement visitor sessions and use Remix’s cookie helper to redirect the user to the right page after login or signup. Next, we will learn how to add pagination with Remix and Prisma. We will practice pagination by applying it to the expense and invoice lists in BeeRich.
After reading this chapter, you will know how to use cookies to persist arbitrary session data in Remix. You will also understand the difference between Remix’s session cookie and cookie helpers. Additionally...