
Senior Lead Software Developer @CDS_GC 🇨🇦 Canadian Digital Service
Canada
Joined November 2008
- Tweets4.3K
- Following1.6K
- Followers1.1K
- Likes12.1K
tim arney retweeted
CSS Trick 📏
Auto resizing textarea and input with one line 🔥
textarea, input { field-sizing: content; }
Read all about it in Steph's article 👇 It's landing soon!
xitter.cf/jh3yy/status/173…
📚New on the blog: Better form UX with the CSS property `field-sizing`
blog.stephaniestimac.com/pos…
tim arney retweeted
Thanks to `flushSync`, you can finally manage focus in React again 🙌 (but I will always love this.setState)
tim arney retweeted
🔥 JavaScript Sets are about to become a lot more useful with these 7 new methods:
.difference()
.intersection()
.symmetricDifference()
.union()
.isSubsetOf()
.isSupersetOf()
.isDisjointFrom()
tim arney retweeted
I'm compiling a list of "recipes" for block developers for a new workshop I'm calling The Block Developers Cookbook.
I have a number already but am always looking for more. Please share them as issues on my repo -
kdta.io/ieQF3
tim arney retweeted
Tip: @ChromeDevTools can now override the content of Fetch/XHR requests! Great for mocking APIs without waiting on backend changes!
This and lots more in Chrome 117: bit.ly/wnd117
tim arney retweeted
Did you know that React considers APIs like cloneElement, React.Children, and createElement to be legacy? They aren’t recommended for newly written code, and the docs have some alternative suggestions. Be careful using patterns that rely on these.
react.dev/reference/react/le…
> 'FuzzyHighlighter' cannot be used as a JSX component.
@mattpocockuk curious if you could explain what's going on with this React component type error.
codesandbox.io/p/sandbox/mud…
tim arney retweeted
Most sandboxes in CodeSandbox are stored in a Postgres database.
40M+ sandboxes and 400M+ files stored in Postgres, and we still have performant load times.
When going with Postgres, I thought "this is the first thing we'll have to replace". Still didn't happen after 6 years 🤷
In 2020 Figma started hitting growing pains with their single managed Postgres database.
That means they managed to grow to a $2B company on a single mged instance.
I bet at they hired engineers around this time who grumbled about not picking a more ‘scalable’ tech.
tim arney retweeted
A 🤯 feature of Server Actions is they support progressive enhancement: a server function passed to a <form>'s action prop is interactive before any JS has loaded. No hydration required.
But you did you know you can define actions on the client, too? nextjs.org/blog/next-13-4#se…
tim arney retweeted
DX in @liveblocks is absolutely mad.
See this React hook?
It grabs a real-time object named `person`. Every time the object changes, this hook automatically updates with the new value.
No back end, no setting up WebSockets 🤯 it just works.
> Three JavaScript Operators You Should, But Maybe Don't, Know
👀
??=
||=
&&=
youtube.com/shorts/gmkdMTFg_…
If you ever run into which type do I use... ReactNode, ReactElement, JSX.Element etc...
Found this - which helps uncover the mystery
Understanding React's types
youtube.com/watch?v=u_zoRJh9…
xitter.cf/mattpocockuk/status/16…
tim arney retweeted
Damn, we just found a solution to a really hard accessibility problem, I don't think this has been done before:
How do you make this component fully keyboard accessible if both icon and px are buttons and this component is part of a list, so I don't want to tab through each 3x?
tim arney retweeted
useRef is pretty weird in TypeScript.
Here's a couple of gotchas that I always run into:
tim arney retweeted
New article! 🚀
Do you want to prevent empty re-renders in React child components without sacrificing the readability or maintainability of your codebase?
Forget about `memo` and `PureComponent`!
Do this instead 👇
whereisthemouse.com/react-co…




















