Theme Cookie
π¨βπΌ Great job! That's pretty low-level cookie management, but it's perfect
π¦ One optimization we could possibly make is to change the cookie on the client
and trigger a manual state update. But the benefit of the way we have it here is
we can completely change the data that comes back based on the value of the
cookie and if we applied that optimization we'd need to revalidate the data
anyway.
So we won't be making that optimization for two reasons:
- It limits our capabilities
- Users don't change their theme very often anyway, so it's really unnecessary.
π¨βπΌ Good point Olivia! That said, there is something else we can do to improve
the user experience a lot. Let's do that next.