danfrydev Profile Banner
Daniel Fry Profile
Daniel Fry

@danfrydev

Followers
352
Following
3K
Media
2
Statuses
62

Software Engineer @chase_uk

London
Joined February 2022
Don't wanna be here? Send us removal request.
@danfrydev
Daniel Fry
3 years
https://t.co/5JdIRrenLg vs create-react-app ๐Ÿคฏ #bunjs
126
728
5K
@housecor
Cory House
1 year
Goal: Calculate a value once per render. Mistake: Declaring a parameterless function. Why? Because then the function may be needlessly called multiple times on every render. Solution: If a function takes no args, declare a variable instead.
18
19
375
@mattpocockuk
Matt Pocock
1 year
Here's my favourite method for getting Go/Zig/Rust-like errors in TS. It's by returning custom errors from functions. - Shows right in the return type - Easy checking with instanceof - No deps required
93
79
2K
@colinhacks
colinhacks/zod
1 year
loving this pattern to avoid redundancy in complex class declarations...extract the props from the class prototype and use it as the constructor argument โœ… typesafe โœ… no redundant interfaces โœ… constructor becomes a one-liner
39
85
1K
@housecor
Cory House
1 year
TypeScript problem: You need to support any string value, but youโ€™d like autocomplete support for common values. Solution: Create a union with "string & {}" on the end. Now you get autocomplete support for all values listed in the union, but can still enter any value.
20
87
858
@hardestgeezer
Russ Cook
2 years
349 days. 19 million steps. Finish line this Sunday๐Ÿซก
334
2K
51K
@GabrielVergnaud
Gabriel Vergnaud
2 years
TypeScript v5.5 is going to be soooo amazing ๐Ÿ”ฅ The type-checker will now be able to *infer* type predicates for us ๐Ÿ˜ And there's more. Type predicates will โœจcomposeโœจ! Huge, huge thanks to @danvdk for landing this PR, I'm so excited about this!
8
40
228
@danfrydev
Daniel Fry
2 years
๐Ÿš€
@TkDodo
Dominik ๐Ÿ”ฎ
2 years
Can't emphasize enough how crazy good the queryOptions API is for TypeScript users. Here's a short clip of me showing what it can do on a live stream (you can tell it's from last year by the length of my hair ๐Ÿ˜‚). Direct cache operations are finally really type-safe ๐ŸŽ‰
0
0
1
@TkDodo
Dominik ๐Ÿ”ฎ
2 years
๐Ÿ˜ด Tired: enabled not doing any type narrowing ๐Ÿš€ Wired: the brand new skipToken ๐Ÿ”ฅ Now available in v5.25.0
21
40
529
@crutchcorn
Corbin Crutchley
2 years
I wrote a game of TicTacToe using only TypeScript's type system
10
10
207
@encord_team
Encord
2 years
We've got you covered
0
1
8
@raycast
Raycast
2 years
The Mac turns 40 today ๐ŸŽ‚ To celebrate, we're giving away Raycast Pro with GPT-4 for one year to 40 people. Simply retweet this tweet and follow @raycastapp to enter. Winners will be announced by the end of the week.
63
965
737
@TkDodo
Dominik ๐Ÿ”ฎ
2 years
๐Ÿ“š So I finally found the time to write about why we made the breaking parameter changes in v5, and what this new API enables us to do. Prepare to have your mind blown if you don't yet know what the Query Options API can do for you ๐Ÿคฏ https://t.co/MAXFZVCzH1
Tweet card summary image
tkdodo.eu
v5 brought a new, powerful API, especially if you're using React Query with TypeScript...
13
42
379
@mattpocockuk
Matt Pocock
2 years
TypeScript 5.4 will bring a new utility type: NoInfer. This will be EXTREMELY useful for generic functions where you have multiple candidates for inferring a type. In the example below, we use NoInfer to make sure that 'initial' must be one of the states passed.
33
138
1K
@TkDodo
Dominik ๐Ÿ”ฎ
2 years
๐Ÿ“ขAnnouncing TanStack Query v5 ๐ŸŽ‰๐Ÿฅณ ๐Ÿค unified object API ๐Ÿ“ˆ simplified, optimistic updates โ™ป๏ธ sharable mutation state ๐Ÿ”€ suspense and streaming w/ RSC โ™พ๏ธimproved infinite queries โšก๏ธ ~20 % smaller ๐Ÿ› ๏ธnew agnostic devtools ๐Ÿ’พ fine-grained persistence
60
316
2K
@claviska
Cory LaViska
2 years
Implemented safe triangles to improve submenu selection in @shoelace_style today.
114
523
6K
@jarredsumner
Jarred Sumner
2 years
as a twitter video
33
113
969
@_georgemoller
George Moller
2 years
โŒ Avoid listening for ref changes with useEffect() in React. โœ… Instead use a ref callback function.
17
148
981
@wesbos
Wes Bos
2 years
๐Ÿ”ฅ JavaScript Sets are about to become a lot more useful with these 7 new methods: .difference() .intersection() .symmetricDifference() .union() .isSubsetOf() .isSupersetOf() .isDisjointFrom()
82
821
5K
@_georgemoller
George Moller
2 years
โŒ Avoid difficult-to-read conditionals to render elements in react. โœ… Instead use utility components for conditional rendering.
63
234
2K
@encord_team
Encord
2 years
๐Ÿ Human pose estimation with Encord's powerful annotation tool
0
1
1