Sign in

Sergio Xalambri

@sergiodxa.com
741 followers 195 following 54 posts

Writing "React Router OAuth2 Handbook" Web Developer at Daffy.org Blogger at sergiodxa.com Open Source Author at GitHub.com/sergiodxa Sponsor me at github.com/sponsors/sergiodxa

PostsRepliesMedia
Sergio Xalambri @sergiodxa.com · 25/10/2025
I was able to build a @remix.run v3 `lazy` function to lazy load components The lazy loaded component retains the type of the props with an additional `fallback` prop to pass the JSX to render until it's loaded Code: github.com/sergiodxa/re...
010
Sergio Xalambri @sergiodxa.com · 22/10/2025
Another @remix.run v3 example. This is how you can create custom components that allow the parent to listen to custom events. Full code: github.com/sergiodxa/re...
042
Sergio Xalambri @sergiodxa.com · 17/10/2025
The code is here if you figure know more about Legend State and can figure out how to do that github.com/sergiodxa/re...
github.com
remix-v3-examples/app/state-libs/legend-state.tsx at main · sergiodxa/remix-v3-examples
Contribute to sergiodxa/remix-v3-examples development by creating an account on GitHub.
010
Sergio Xalambri @sergiodxa.com · 17/10/2025
Here you have, I tried to use the `observe` function but I was not sure how to stop observing the observable once the component is unmounted (the signal does that), the observable onChange works perfectly for this
110
Sergio Xalambri @sergiodxa.com · 17/10/2025
What is legend state?
media.tenor.com
a man in a suit and tie says " legen wait for it dary " while another man looks on
ALT: a man in a suit and tie says " legen wait for it dary " while another man looks on
100
Sergio Xalambri @sergiodxa.com · 17/10/2025
Another @remix.run v3 + state management library example, now Stately.ai's xstate. Define the machine once, create the actor and subscribe to updates in the setup scope, and get a snapshot or send events on the render scope. Full code: github.com/sergiodxa/re...
031
Sergio Xalambri @sergiodxa.com · 17/10/2025
Next on @remix.run v3 + state management libraries, I tried @preactjs.com Signals core package. This requires to run the effect to subscribe to the signal inside this.queueTask, otherwise it tries to re-render before Remix did the first render. Full code: github.com/sergiodxa/re...
031
Sergio Xalambri @sergiodxa.com · 17/10/2025
I'm trying different state management libraries, common in React, that have a JS only core and see how they integrate with @remix.run v3. I started with Redux Toolkit. Super simple and straightforward to setup and use. Code here: github.com/sergiodxa/re...
141
Reposted by Sergio Xalambri
React Router @reactrouter.com · 26/08/2025
In June we announced an open governance model for React Router. Today, we are excited to welcome Sergio Xalambrí and @rossipedia.com to the React Router Steering Committee! Both have made valuable contributions to Remix and React Router over the years, and we appreciate their feedback.
3306
Sergio Xalambri @sergiodxa.com · 14/05/2025
The early bird for React Router OAuth2 Handbook is over, but there’s still a launch offer available. 🎁 The Complete Package has $50 off for the first 100 buyers. 🌍 PPP pricing is now active — for the book only. go.sergiodxa.com/S4qaycD
go.sergiodxa.com
React Router OAuth2 Handbook
Implement secure OAuth2 authentication in React Router and Remix apps with practical patterns.
050
Sergio Xalambri @sergiodxa.com · 16/04/2025
Want to dive deeper into how tokens work in OAuth2 + OIDC? Learn how to use them correctly in your Remix or React Router app. 📘 Join the waitlist for the React Router OAuth2 Handbook: 👉 go.sergiodxa.com/x4HNprT
books.sergiodxa.com
React Router OAuth2 Handbook
Implement secure OAuth2 authentication in React Router and Remix apps with practical patterns.
020
Sergio Xalambri @sergiodxa.com · 16/04/2025
🪪 The ID Token’s audience is the Client Application. It contains user identity info and is meant to be consumed by the client, not by the API or auth server. That’s why its aud claim matches the client’s ID.
100
Sergio Xalambri @sergiodxa.com · 16/04/2025
🔄 The Refresh Token’s audience is the Authorization Server. It’s the only one allowed to accept it and issue a new Access Token. This keeps refresh logic centralized and secure, preventing misuse by clients or other services.
100
Sergio Xalambri @sergiodxa.com · 16/04/2025
🔑 The Access Token's audience is the Resource Server. It’s the one that will validate and accept the token to give access to protected resources. This way, only the Resource Server can rely on it—it’s not meant for the client or the auth server.
100
Sergio Xalambri @sergiodxa.com · 16/04/2025
In OAuth2 + OIDC, each token has a different audience: 🔑 Access Token → Resource Server 🔄 Refresh Token → Authorization Server 🪪 ID Token → Client App Each audience ensures the token is used by the right party and for the right purpose.
111
Sergio Xalambri @sergiodxa.com · 12/12/2024
I published a Remix Auth strategy for the new @sst.dev's OpenAuth.js identity provider github.com/sergiodxa/re...
github.com
GitHub - sergiodxa/remix-auth-openauth: A Remix Auth strategy to use with an OpenAuth.js issuer
A Remix Auth strategy to use with an OpenAuth.js issuer - sergiodxa/remix-auth-openauth
0181
Sergio Xalambri @sergiodxa.com · 08/12/2024
ClientLoader doesn’t have access to context, this is a server only thing, rossipedia has been asking for an equivalent client version for a long time Client side you can define it once in a separate file and just import it
110
Sergio Xalambri @sergiodxa.com · 06/12/2024
I think @kentcdodds.com build it, he should have the code
120
Sergio Xalambri @sergiodxa.com · 06/12/2024
On the Remix server we have a bot that can create threads when you add a emoji to a message and automatically name the thread like "🧵 Thread for Dominik" I use it a lot there to create them so I don’t think about the name
130
Sergio Xalambri @sergiodxa.com · 23/11/2024
Most of that was already available before the standalone app, although the app is great, would be nice to have secure notes for things like API keys
100
Sergio Xalambri @sergiodxa.com · 23/11/2024
Yes, you can create a group and share passwords there, you can have many groups too
020
Sergio Xalambri @sergiodxa.com · 23/11/2024
Does this works with providers like GitHub, Google, Auth0, etc? From what I saw it seems it should since they use client id and client secrets?
110
Sergio Xalambri @sergiodxa.com · 22/11/2024
I like the ideas it brings, specially ship less JS, but I'm not convinced the complexity is worth it, although I never tried it since I haven't used Next.js in years I also don't like how it was approached, I always liked that React features were first tested at Meta with their scale, but not RSC
000
Sergio Xalambri @sergiodxa.com · 20/11/2024
So you can, without Vite 6, already use the actual wrangler instead of the proxy?
100
Sergio Xalambri @sergiodxa.com · 20/11/2024
I have my own starter github.com/edgefirst-de..., alt ought it does more than just a base point
github.com
GitHub - edgefirst-dev/starter-worker
Contribute to edgefirst-dev/starter-worker development by creating an account on GitHub.
100
Sergio Xalambri @sergiodxa.com · 20/11/2024
Cloudflare, previously Pages but now switching to Workers since it has all the nice things of Pages and more features
120
Sergio Xalambri @sergiodxa.com · 16/11/2024
How to properly build UIs, accessibility, feature proposals for JS
060
Sergio Xalambri @sergiodxa.com · 12/11/2024
Same, I dropped CamelCase for file names after my first time someone renamed fileName to FileName and it started to cause issues on some systems but not others
120
Sergio Xalambri @sergiodxa.com · 10/11/2024
From that point, everything is an enhancement, scoped styles and interactivity with JS
000
Sergio Xalambri @sergiodxa.com · 10/11/2024
I think starting with HTML-only would be a great way to make it declarative and work with progressive enhancement, in the absolute worst case you get an empty element, but if the template tag loaded (because it's in the document or imported) it will still render something
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
What's the difference once you add JS to customize their behavior? Maybe it could have a `<template name="user-item" shadow>` that could avoid replacing the tag with the partial so it's "hidden"
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
I can imagine web frameworks like Ruby on Rails, Django, Laravel, etc. adding support for this at their template level, imagine Rails partials generating this Progressive WC for you so you don't have to do it yourself It could even load the correct HTML imports in your views
000
Sergio Xalambri @sergiodxa.com · 10/11/2024
Pair all of that with import maps and we could have HTML partials, scoped styles and JS files for WC cached forever And because it starts with HTML instead of JS like WC it could go from something super simple to avoid repetition to a more advanced component Like a Progressive Web Component API
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
To add interactivity, we could also load a JS file inside the template If this JS has an `export default` with a class extending HTMLElement the browser could automatically instantiate it with a reference to the partial DOM reference to let you add events or manipulate it
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
To add scoped styles we could make it so any <style> or <link rel="stylesheet"> inside a <template> is automatically scoped to that partial <template name="user-item"> <link rel="stylesheet" href="/styles/user-item.css" /> some HTML here </template> Something like that ☝️
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
And to share it between pages and get it cached use HTML imports: <link rel="import" href="/partials/user-item.html" /> If you want to cache it forever, hash the file name <link rel="import" href="/partials/user-item.HASH.html" />
100
Sergio Xalambri @sergiodxa.com · 10/11/2024
From time to time I want to see if Web Components improved They could have been way better if we started with a simple partial defined using the <template> tag and a name attribute <template name="user-item"> some html here </template> Then you do `<user-item>` and the browser inline the partial
571
Sergio Xalambri @sergiodxa.com · 08/11/2024
Anyway, I don't want to keep discussing this forever, but this is why I said we don't typically identify with what's considered Latino I feel more identified with an Uruguayan, or even Chilean or south of Brazil, than the rest of the countries, specially those nearer to the US than Argentina
120
Sergio Xalambri @sergiodxa.com · 08/11/2024
So from Mexico, Central American and Caribbean? Not even South American, and every South American country has their own jargon too I talked with people from almost all Latino American and in many cases I couldn't understand their jargon The far away is each country the more different we talk
110
Sergio Xalambri @sergiodxa.com · 08/11/2024
Of all of that food, only empanadas are typical in Argentina, and the empanadas we eat in Argentina are prepared in a different way than in other places from latam Did you got images of an asad? pizza? pasta? milanesas? This is what I get from Google, and compare with searching for "Argentina food"
Google Images results for "latino food" showing many Mexican, Colombian, Venezuelan, etc. food,Google Images results for "Argentinian food" showing empanadas, choripanes, milanesas, pasta, alfajores
010
Sergio Xalambri @sergiodxa.com · 07/11/2024
Every country is in Latino America is really different, yet if you lookup for latino food most pictures are tacos and other Mexican food. And if you google latino jargon it will show Mexican expressions And for latino music that's reggaeton, probably the only not Mexican, yet from near countries
220
Sergio Xalambri @sergiodxa.com · 07/11/2024
That doesn't mean we can't move to other Latino American countries to get a better opportunities (aka more money) But from the Argentinian I met in other countries since I left Argentina myself, we keep trying to eat our food, listen our music, and in general do our things Not all of course
030
Sergio Xalambri @sergiodxa.com · 07/11/2024
We don't typically identify ourselves with what's considered the Latino culture which is usually centered around Mexico I'm Latino because geographically I'm from Latino America, but that's it
240
Sergio Xalambri @sergiodxa.com · 03/11/2024
"This task could have been an email" is the equivalent of 0 story points
010
Sergio Xalambri @sergiodxa.com · 03/11/2024
Imagine you have a lot of tasks in a TODO app, you want to mark them as done, so you click multiple ones triggering each one a POST That's a mutation where you want each one to run in parallel as they don't depend on each other, with serial execution of POST the user will have to wait a lot of time
110
Sergio Xalambri @sergiodxa.com · 02/11/2024
38 starter packs and not a single one named after TanStack
110
Sergio Xalambri @sergiodxa.com · 02/11/2024
From what I understood, a group of people to follow, usually related somehow, e.g. a TanStack Starter Pack could list the Bluesky accounts of anyone associated with TanStack. So anyone wanting to follow TanStack accounts could follow them at once
120
Sergio Xalambri @sergiodxa.com · 02/11/2024
Those are defined by the component, it’s more like dependency injection, and are called by the component not the parent
140
Sergio Xalambri @sergiodxa.com · 01/11/2024
It's really nice, it reminds me of IndieAuth, super simple way to know someone is who they said they are
040
Sergio Xalambri @sergiodxa.com · 01/11/2024
Passkeys would definitely be nice to have as an option
000