
UI/UX designer/prototyper/developer in San Diego. Tennis & automobile enthusiast. ๐ณโ๐ him/his. @devuxer@mastodon.social
San Diego, CA
Joined January 2012
- Tweets3.4K
- Following253
- Followers129
- Likes4.3K
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Oh boy, I sure hope this one gets added to JavaScript. Would cut down on a lot of my current .reduce() usage.
Currently stage 2, Array grouping would make it easy to group items of an array.
Works with Maps too, so you could use any type as a key.
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Replying to @chribjel
Do you feel safe with Vercel Postgres which is in beta ?
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Passwords made my mother cry again. It's unreasonable to expect people to remember varying usernames and passwords for as many as 100 sites, most of which are infrequently used.
Password managers can help, but they often fail to catch reset flows. In cross-device scenarios, you're often forced to use multiple password managers due to how systems operate.
Typically, passwords are about 10 characters long. If these passwords are unique and random, we're asking people to remember an ever-changing set of characters, maybe as many as 1000, across numerous sites.
To rely on password managers, we're expecting regular users to understand how these systems work and to manually verify they are living up to expectations.
This reliance on complex password systems isolates older people from technology, the communities they engage with, and the supporting infrastructure.
We need the web to standardize on WebAuthN and Passkeys. They promise to greatly simplify the experience for users.
By adopting these technologies, we can make the web more user-friendly and inclusive, reducing the burden of password management and increasing accessibility for all.
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
My take: nitter.cf/dai_shi/status/1650126โฆ
Just published Why You Don't Need Signals in React. Because we have Jotai.
blog.axlight.com/posts/why-yโฆ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Today the TypeScript team is releasing a new VS Code extension named Deopt Explorer!
This tool can help find polymorphism and deoptimizations in your code, and it's already helped us speed up TypeScript itself. Check out what we've built!
devblogs.microsoft.com/typesโฆ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Problem: JavaScript's sort method mutates the existing array.
Solution: The new toSorted method.
It returns a new array, and doesn't mutate the existing array.
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Node 20 allows you to compile your app into a single executable along with the entire Node.js core so you can run your apps on systems where node isn't installed, or your don't trust the system version.
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
I just mailed my passport to get it renewed. A couple things that are annoying:
1. You have to mail in your existing passport!? Why?
2. Even expedited, it says it'll take a minimum of 7 *weeks* to come back, during which time you can't travel internationally. Why so long?! What about people who travel every couple weeks!?
3. Some countries won't allow you to enter if your passport is within 6 months of expiring. What good is an expiration date then?!
Ugh. I hope it comes back before my next trip! ๐ตโ๐ซ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Easy to forget, but the debate about signals is the same one we had about 2-way data binding vs unidirectional data flow 10 years ago. Signals are mutable state! Theyโre bindings with a new name. The simplicity of UI as a function of state is lost when updates flow unpredictably.
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
TypeScript tip: Use โneverโ to assure every case in a switch is handled.
With this example, if a case is missing, TypeScript fails to compile. ๐
#typescript

ALT type IconType = "info" | "success"; function renderIcon(type: IconType): JSX.Element { switch (type) { case "info": return <Info />; case "success": return <Success />; default: unhandledIconType(type); } } function unhandledIconType(type: never): never { throw new Error("Unknown icon: " + type); }
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
If you are creating configuration objects in TS and not using the `satisfies` operator, you are doing it wrong
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
what do you think about the implicit return console log?
const Box = ({ props }) => console.log(props) || <div>hi</div>
This Post is from an account that no longer exists. Learn more
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
What's the best spot to host a tiny Postgres instance without entering your credit card details?
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Replying to @JacobMGEvans
The vast majority of React apps use React Router, but many haven't yet upgraded to the latest version that includes loaders and actions.
Show how React Query and React Router 6.4 can be used together to make a fantastically simple app: tkdodo.eu/blog/react-query-mโฆ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
This is a superb visualization of European history (1500-2022).
nitter.cf/WallStreetSilv/status/โฆ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Replying to @acdlite
Oh so it's ref-log and not re-flog ๐ฎ. TIL. I always wondered what a flog is and why we are redoing it ๐
๐.
rebase, rename, revert, reset, reflog ๐คทโโ๏ธ
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
Replying to @devuxer
A monad is just flatMap, and promises are just asynchronous flatMap. You're right about composition, because flatMap is just function composition for things that return stuff like promises, arrays, etc. instead of just the raw value as function output. #ExplainMonadsInATweet
Dan M ๐บ๐ฆ๐จโ๐ป๐พ๐๐ณ๏ธโ๐ retweeted
๐คReact Query and React Router (the remixed one, v6.4) - how do they integrate? Should I use one or both for data fetching?
I went through the tutorial and integrated RQ into it. Read about it here: tkdodo.eu/blog/react-query-mโฆ


















