Sergio Xalambrí

Tutorials

Learn about Remix, React, and more.

Subscribe to my tutorials using RSS.

  1. Use an `iife` Helper for Inline Control Flow in TypeScript

  2. Cancel `useFetcher().load()` on Unmount in React Router

  3. Access React Router Context with AsyncLocalStorage

  4. Create a Per-Request Database Instance with Middleware

  5. Create a Multi-Directory Route Organization in React Router

  6. Use Sec-Fetch Headers for CSRF Protection

  7. Dedupe Server Calls with Remix Utils Batcher

  8. Transform FormData Between UI and Database in React Router

  9. Build a Master-Detail UI with React Router

  10. Leverage React Router's Built-in Data Deduplication

  11. Redirect Based on Screen Size in React Router

  12. Avoid Waterfalls in React Suspense

  13. Handle deferred data in React Router

  14. Use Action Routes in React Router

  15. Add a Color Scheme Toggle in React Router

  16. Debounce Loaders and Actions in React Router

  17. Use client_id and client_secret in OAuth2

  18. Use the OAuth2 Introspection Endpoint

  19. Revoke a Refresh Token in OAuth2

  20. Use PKCE in OAuth2 Authorization Code Flow

  21. Add Custom Claims to JWT Access Tokens

  22. Validate exp, iat, and nbf in JWTs

  23. Use `scope` to Authorize Actions in Your API

  24. Validate JWTs with JWKS

  25. Create a Per-Request Singleton with React Router Middleware

  26. Test Middleware in React Router

  27. Use middleware in React Router

  28. Show a 404 in React Router

  29. Download a file from a React Router route

  30. Use Bullet to Detect N+1 Queries in Rails

  31. Use Pandoc to convert a Markdown to a PDF and ePUB

  32. Load Dynamic Stylesheets in React Router

  33. Split routes config in React Router

  34. Configure the tracking branch in Git

  35. Reuse route modules in React Router

  36. Populate Your Rails Database with Fixtures

  37. Stub a method in a class with Minitest

  38. Show toast after a Remix action

  39. Simplify Component Imports with TypeScript Namespaces

  40. Validate Form in Remix with clientAction

  41. Generate Cloudflare environment type with wrangler

  42. Configure scoped private packages in Bun

  43. Use package.json#bin to create a CLI

  44. Access location.state in Remix loaders and actions

  45. Add i18n to a Remix Vite app

  46. Autoload the correct Node version with NVM

  47. Nest routes with dynamic params in Remix

  48. Build a simple login and logout with Remix

  49. Access React Router's loader data from a route ErrorBoundary

  50. Access React Router's Loaders Data in entry.client

  51. Handle not found URLs with Remix

  52. Persist the User Locale Using Cookies with React Router and i18next

  53. Add dynamic canonical URL to Remix routes

  54. Add custom attributes to Markdoc code fences

  55. Enable Remix ~/ aliased imports in Vitest

  56. Add syntax highlight to Markdoc using Prism.js

  57. Create a CRUD with Remix

  58. Pass Cookies from a React Router Loader to an External API

  59. Call an action from a loader in Remix

  60. Use React Portal in Remix

  61. Prevent the React Router Loader to Run after Document Request

  62. Defer a Fetch response in Remix

  63. Use a CDN for your static assets in Remix

  64. Get the absolute URL in Remix's MetaFunction

  65. Build an app with Remix and Bun

  66. Find and remove unused code with Knip

  67. Create multiple top-level layouts in Remix

  68. Test meta tags using Playwright

  69. Prefetch data for Remix Fetcher usage

  70. Keep Your Loader Data Fresh in Remix

  71. Expose Remix Routes as API Endpoints

  72. Access the Search Params of a Request in React Router

  73. Upload Images in a Remix Application

  74. Redirect with Search Param in Remix

  75. Access the Loader Data in Remix

  76. Abort Async Calls Inside Remix Loaders and Actions

  77. Get Remix route params `entry.server`

  78. Test meta tags with Cypress

  79. Strongly type Remix route IDs

  80. Strongly type public assets in Remix

  81. Create a reusable Form component in Remix

  82. Sync text input with URLSearchParam in Remix

  83. Use TanStack Query to Share Data between React Router Loaders

  84. Logout from Auth0 with Remix Auth

  85. Send Node.js ReadStream objects from Remix loaders

  86. Reset a form on success in Remix

  87. Use `qs.parse` to use nested form fields in Remix

  88. Send JSON to a Remix action

  89. Set Multiple Cookies in the Same Response in React Router Loaders

  90. Close SSE connection from the server in Remix

  91. Measure performance with the Server-Timing header in React Router

  92. Automatically commit sessions on Remix

  93. Customize Remix AppLoadContext type

  94. Turn on Caps Lock on Cypress

  95. Delete a Cookie using Remix cookie helpers

  96. Add runtime SSG and ISR to Remix

  97. Improve SEO by not sending JS in Remix

  98. Use AMP with Remix

  99. Use Remix as a SPA only

  100. Downgrade to MPA if Users Prefer Reduced Data in React Router

  101. Add rolling sessions to Remix

  102. Use Server-Sent Events with Remix

  103. Progressively Enhance the useFetcher Hook in React Router

  104. Use `process.env` client-side with Remix

  105. Persist inputs after a form submit in Remix

  106. Lazy-load React components in Remix

  107. Destroy User Session and While Setting a Flash Message in React Router

  108. Add additional data before submitting on Remix

  109. Redirect to an external website with Remix

  110. Bubble up data on Remix routes

  111. Group related routes together in Remix

  112. Parse Markdown with Markdoc in Remix

  113. Optimize image loading with plain HTML

  114. Add returnTo behavior to Remix Auth

  115. Share session and cookies between Next and Remix

  116. Fix double data request when prefetching in Remix

  117. Run Tailwind and Remix in Parallel with PM2

  118. Use Remix with socket.io

  119. Generate a PDF in Remix with Resource Routes

  120. Avoid waterfalls of queries in Remix loaders

  121. Run Next and Remix on the same server

  122. Test Remix loaders and actions

  123. Use NProgress in a Remix app

  124. Use Fathom with Remix

  125. Fix `gyp: No Xcode or CLT version detected!` error

  126. Use Dependabot to keep Remix up-to-date

  127. Load only the data you need in Remix

  128. Use ETags in Remix

  129. Redirect to the original URL inside a Remix action

  130. Read search params with JS

  131. Use ActiveModel::Serializer with non ActiveRecord object

  132. Serialize list of items with ActiveModel::Serializer

  133. Use serializers with JSON.stringify and JSON.parse

  134. Force a locale in Rails I18n from the params

  135. Add missing `created_at` and `updated_at` columns in Rails

  136. Build your own RSS Reader

  137. Keep Heading Levels Consistent with React Context

  138. Use TailwindCSS Typography with Dark Mode Styles

  139. Use SWR with Geolocation

  140. Sync WebApp Session Status between Tabs with SWR

  141. Sync SWR cache with Web Storage

  142. Configure Google Suite MX records in Vercel

  143. Report Web Vitals in Next.js

  144. Use React.Suspense to wait for an image to load

  145. Purge unused CSS with TailwindCSS

  146. Setup a redirect inside a project deployed to Vercel

  147. Use a scoped registry with Yarn

  148. Automatically Publish to npm using GitHub Actions