Theme Cookie

πŸ‘¨β€πŸ’Ό Let's start working with the theme cookie.
We want the user to be able to choose between light and dark mode. Our application is already set up to handle this via a class name on the <html> element (put light or dark in the class name and the UI will update through the magic of CSS Custom Properties + Tailwind).
So all we need to do is finish the implementation of and then finish wiring things up in .
πŸ‘¨β€πŸ’Ό When you've finished, you should be able to click the icon in the bottom right to update the theme. You'll notice a network request each time you click it so the server can update the cookie. You should see the set-cookie header

Please set the playground first

Loading "Theme Cookie"
Loading "Theme Cookie"

Access Denied

You must login or register for the workshop to view and run the tests.

Check out this video to see how the test tab works.