Lenz Weber-Tronic Profile Banner
Lenz Weber-Tronic Profile
Lenz Weber-Tronic

@phry

Followers
3,478
Following
1,088
Media
288
Statuses
13,337

Working on Apollo Client @apollographql Redux Toolkit Co-Maintainer Creator of RTK Query

Deutschland
Joined May 2009
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@phry
Lenz Weber-Tronic
3 months
Internet, meet Coco. She just stayed at our place for the first night. I'm tired but happy 😊
Tweet media one
1
0
24
@phry
Lenz Weber-Tronic
2 years
Did you know you can make `reduce` even more unreadable by putting an async function in there?
Tweet media one
27
44
585
@phry
Lenz Weber-Tronic
1 year
After witnessing "peak RSC frustration Twitter week", I sat down on the weekend and tried to write down my take on this - as a blog post. More balanced. No unexplained frustration in 280 characters. And some constructive ideas.
9
57
304
@phry
Lenz Weber-Tronic
6 months
@kettanaito Very cryptic, but I get the hidden message.
Tweet media one
3
0
281
@phry
Lenz Weber-Tronic
1 year
I'm proud to announce that today we are launching an experimental package that will help people use Apollo Client with the new @nextjs App Router - in React Server Components, but also in Client Components with streaming SSR and Suspense!
11
33
218
@phry
Lenz Weber-Tronic
1 year
I didn't realize before, but in RSC, React.Component is not available anymore. Seems like React Class components are finally dead, officially.
Tweet media one
13
11
181
@phry
Lenz Weber-Tronic
3 years
I just came up with this neat trick to enforce that a hook argument or prop has hone through useMemo or useCallback. What do you think?
Tweet media one
14
13
157
@phry
Lenz Weber-Tronic
1 year
@alexdotjs You can even `return false` in the finally block and change the return value after the fact.
8
0
156
@phry
Lenz Weber-Tronic
2 years
I am looking for a new job. Does your company have a great product made for developers and you need a Senior FullStack Developer or a Developer Advocate? Do you have internal teams that need support and coaching to stay on top of tech? We should talk.
9
48
154
@phry
Lenz Weber-Tronic
5 years
@kcnaija @dan_abramov Have you actually read that thread?
1
0
152
@phry
Lenz Weber-Tronic
2 years
I'm happy to announce that today is my first day working at @apollographql ! I'll be working on the Apollo JS Client library and its ecosystem. Let's make this even more awesome! 🚀
22
5
134
@phry
Lenz Weber-Tronic
2 years
Hey @kentcdodds , I just thought I give quick feedback: The promo emails have been piling up here. 16 emails in a week are not something that I want to get - it's quite annoying. I'm unsubscribed now. Is there something going wrong or is this intended?
Tweet media one
8
1
123
@phry
Lenz Weber-Tronic
4 years
Library maintainers! I just published to npm This could be interesting for your documentation. * it transpiles TypeScript code examples to JavaScript * it typechecks your TypeScript code examples * it allows you to include Docblocks from your sourcecode
5
26
122
@phry
Lenz Weber-Tronic
5 years
@thekitze If the alternative is one UI running on every port from 8000 to 9000 and having to remember the port number to make a click in a badly-designed obscure UI I'd happily take another CLI ;)
3
1
117
@phry
Lenz Weber-Tronic
2 years
This one is for library authors: frustrated how TS versions handle your package slightly differently, but don't want to ship a full copy of your types with TypesVersions? Now you can adjust your types depending on the TS Version! Just published as
Tweet media one
Tweet media two
4
14
100
@phry
Lenz Weber-Tronic
9 months
Trying to package a package for CJS and ESM with TypeScript types and export conditions for React Server Components is killing me right now. What's wrong here?
Tweet media one
16
3
98
@phry
Lenz Weber-Tronic
2 years
It's an amazing feeling to open @eggheadio and see my course for RTK Query in the spotlight like this. I'm super motivated and will soon start to record the intermediate course. In the meantime: check out this course - it's free!
Tweet media one
6
14
88
@phry
Lenz Weber-Tronic
3 years
A few years ago I'd have been proud of coding for two weeks straight, now I'm kinda proud that I managed to stay away from it for two weeks.
Tweet media one
6
2
88
@phry
Lenz Weber-Tronic
2 years
I cannot stress how much I want to recommend everyone using Redux to go through our Style Guide from time to time. Many tutorials, blog posts and even books out there show styles of building Redux logic we explicitly recommend against.
1
14
89
@phry
Lenz Weber-Tronic
2 years
The exact opposite of this whole thread. There's no reason to avoid any of these. Some of them should maybe be used sparingly and with purpose, but not avoided as a general rule.
7
5
86
@phry
Lenz Weber-Tronic
1 year
@leeerob @kentcdodds > The React canary channel is stable for frameworks like Next.js to adopt Be honest: This point is such a fig leaf. The only framework that can get the insights to do so right now is Next.js, because you have the React team next door and there's no doc.
2
5
86
@phry
Lenz Weber-Tronic
2 years
I'm procrastinating and building something that will forever change my #GitHub and #StackOverflow experience.
Tweet media one
6
5
85
@phry
Lenz Weber-Tronic
2 years
So apparently `Promise.race` can cause a memory leak because it never stops waiting for the failed promises. I would have assumed that something like that is handled by the JS engine. Of course we use that in RTKs `listenerMiddleware` - time to fiddle around...
3
2
70
@phry
Lenz Weber-Tronic
2 years
@brian_d_vaughn @reactjs @typescript Maybe you wanted `useRef<HTMLDivElement>(null)` ?
Tweet media one
1
2
70
@phry
Lenz Weber-Tronic
2 years
@wildlearnerapp Hi, I'm a Redux maintainer. Those are two technologies that do different things and are often used together - about 40% of React applications choose Redux as well. You will *never* be in a situation to choose between them.
3
0
67
@phry
Lenz Weber-Tronic
2 years
My talk at @ReactAdvanced has been accepted - I'll be talking about ADHD, not Redux or TypeScript. Wrong topic for a tech conf? I think not :) Looking forward to seeing all of you in London!
Tweet media one
7
9
66
@phry
Lenz Weber-Tronic
6 years
@nikitonsky @github can you please make this a theme?
0
0
61
@phry
Lenz Weber-Tronic
1 year
@AdamRackis Honestly, she makes a pretty good point. If there are people at the same company who are significantly senior to her and still earn the same amount of money, there's no incentive to stay there other than "enjoying the job" - which she clearly didn't. So good for her to get out.
3
0
59
@phry
Lenz Weber-Tronic
6 months
Calling it now: Someone is gonna find a bug that can only be reproduced with Node 22 stable, React 19 beta, TS 5.5 beta and Apollo Client 3.10, all which released in the last 24 hours or so.
4
4
61
@phry
Lenz Weber-Tronic
2 years
I'm a bit sad that this was not communicated before. Fetch being patched is not a small thing - and from reading the code, this might cause problems with some polyfills - at least from my experience from creating RTK Query.
@rossipedia
rossipedia 🇺🇦
2 years
I'm sorry... but, what? Is React now fucking with the global fetch() object? Please say it ain't so
Tweet media one
44
87
759
8
8
57
@phry
Lenz Weber-Tronic
1 year
"Next.js app router - now production ready, shipping a canary version of React." I think that RSC and streaming SSR have a lot of potential, but I think this is too soon, and I'm really not happy about this decision 🫤
5
5
58
@phry
Lenz Weber-Tronic
1 year
@Rich_Harris @NickSRandall The React team has taken ownership of these types though, even if they are still in DefinitelyTyped.
2
0
54
@phry
Lenz Weber-Tronic
2 years
I'm happy to announce that my first @eggheadio course is now online: An introduction to the RTK Query Basics: Query Endpoints, Data Flow and TypeScript Check it out - it's available for free as a community resource! More courses to follow :)
2
7
52
@phry
Lenz Weber-Tronic
2 years
I very much agree to this. TypeScript enables us library authors to do amazing things - but the ecosystem for lib devs is not there. Doing things right is often undocumented and a pain. Yet, it's worth is.
@neurosnap
Eric Bower
2 years
Library developers need better tooling!
5
9
60
2
7
52
@phry
Lenz Weber-Tronic
1 year
@diegohaz No, sometimes I want to convey intent that the Compiler cannot meaningfully infer, and then writing the type explicitly is very valuable - for the author, the reader, and the codebase. After 6 years of TypeScript, JavaScript is just random mush to me that makes me anxious.
1
1
51
@phry
Lenz Weber-Tronic
6 months
@kettanaito But before that, you answer `for/of`, I hope? :D
2
0
47
@phry
Lenz Weber-Tronic
4 years
I wrote a blog article why you should not use the "discriminating union" #TypeScript pattern for #Redux reducers. I like the pattern, really. Just not in this case. It's a lie to the compiler (and yourself).
4
14
48
@phry
Lenz Weber-Tronic
11 months
And I have a working demo of RTK Query results suspensefully streaming from React SSR to the Browser, made possible by the hooks I patched into the React sources. Beware, everything about this is very experimental 😅 Tomorrow I'll do Apollo Client.
1
7
45
@phry
Lenz Weber-Tronic
1 year
@diegohaz Has to be a bubble thing - in my bubble it's the other way round. But there also seems to be a bit of a disconnect here... IMHO, TypeScript mostly*is* about inference, not about types. Those should only be written where necessary. The less explicit types, the better.
1
0
43
@phry
Lenz Weber-Tronic
3 years
The Redux Toolkit repository now uses yarn2 workspaces, which significantly reduces install times if you want to check out all the examples 🥳
2
2
43
@phry
Lenz Weber-Tronic
4 months
We just published a new version of the ` @apollo /experimental-nextjs-app-support` and ` @apollo /client-react-streaming packages`. Version 0.11.0 comes with a lot of updates: - Prefetching queries for Client Components in RSC - Renamed exports - Next.js 15 support - Less
Tweet media one
5
15
41
@phry
Lenz Weber-Tronic
1 year
So some of the latest @nextjs canaries seem to error on build when an RSC-imported node module even just contains a hook - even if none of those hooks is actually imported. @leeerob could you please look into this?
Tweet media one
Tweet media two
2
5
41
@phry
Lenz Weber-Tronic
5 years
@kcnaija @dan_abramov "Endorsment"? Really? That's your boost, and anyone should be affected by that? It's called analyzing the use case and using a fitting tool for the use case. I hope nobody ever does anything just because Facebook does it. Most of us have vastly different problems to solve.
4
0
39
@phry
Lenz Weber-Tronic
5 years
@a_watch Im ersten Moment dachte ich, mit "Dt. Zuckerwirtschaft" wären Homöopathie-Firmen gemeint 😆
0
0
39
@phry
Lenz Weber-Tronic
5 months
This will break my mind.
Tweet media one
10
0
40
@phry
Lenz Weber-Tronic
3 years
@erikras `type FruitPie = `${Fruit}Pie``
4
0
38
@phry
Lenz Weber-Tronic
11 months
I'm making some good process learning how to add my own experimental hooks for better streaming SSR support to the React sources.
Tweet media one
2
3
38
@phry
Lenz Weber-Tronic
3 years
I just enabled GitHub sponsors. I don't expect that I'll be able to make a living from this, but if someone wants to show me their appreciation for my work, now they can 🙃
2
8
37
@phry
Lenz Weber-Tronic
5 months
One of our users came up with a way around this: Put the secret token into a prop (which will leak into the client bundle), but encrypt it - and have the encryption key available only in RSC & SSR using non-exposed ENV variables. I made a package for it:
@AdamRackis
Adam Rackis
5 months
😣 he's right Client components can't read cookies during ssr—credentials: include does not work in ssr fetch call, nor can cookies be read in middleware for that call I'm about ready to give up on app dir for app development. Maybe Tanstack or Remix will ship something usable
39
8
170
7
2
37
@phry
Lenz Weber-Tronic
2 years
Honestly, I would love to scroll Twitter and see content written by humans instead of screenshots of content written by a bot. I'm here to read what you have to say because I think you're brilliant. It's okay to be hyped about these experiments, but can you please be human again?
3
1
35
@phry
Lenz Weber-Tronic
5 years
While last #TypeScriptTuesday we looked at #TypeScript Generics Basics, today we continue where we left off, by taking a closer look at type argument inference, pitfalls and workarounds. We will take a look at a simplified version of #redux -toolkit's `createAction` function. 🧵👇
Tweet media one
2
12
36
@phry
Lenz Weber-Tronic
11 months
Me at... 20? Close enough. I had just won a "coolest program competition" at uni by implementing multiplayer-capable Tetris in an Assembler dialect for our "self-built" RISC-emulated processor. Good times ^^
Tweet media one
@kentcdodds
Kent C. Dodds 🌌
11 months
Me at 19
Tweet media one
36
3
340
1
0
36
@phry
Lenz Weber-Tronic
5 years
@kcnaija @dan_abramov The performance increased mentioned in the blog article was gained by using plain C. What has swift to do with that? And how exactly was swift boosted? Is there any tooling available for swift developers now that wasn't before? Did it get better in any way?
1
0
33
@phry
Lenz Weber-Tronic
4 years
@AdamRackis @Rich_Harris As a library author: hooks are amazing and allow me to ship APIs that were absolutely impossible before. As someone frequently answering questions in Reactiflux: hooks are amazing and allow me to answer questions much shorter
2
1
35
@phry
Lenz Weber-Tronic
2 years
@sangster @TkDodo The cookie law is only about tracking, technically necessary things like session cookies is untouched anyways
0
2
34
@phry
Lenz Weber-Tronic
5 years
@kriegundfreitag @erzaehlmirnix Ihr zwei seid das Gold meiner Twitter-Timeline.
0
0
35
@phry
Lenz Weber-Tronic
1 year
@mattcarrollcode @spikebrehm @mjackson Where do I give that feedback? I'm yelling into an echo chamber in the RFCs and in the workplace group. At this point I'm giving conference talks in the hopes a React team member might see them at some point.
2
1
33
@phry
Lenz Weber-Tronic
2 years
@wildlearnerapp So as for this article, I honestly don't know if there is any way to change it to make sense... I have never suggested this before, but in this case, deleting it might be the best way to save face?
0
0
33
@phry
Lenz Weber-Tronic
1 year
@pyrasis @TkDodo The maintainer of React Query doesn't know Korean, but still is the best source of information you will get. Grow up as a human and be thankful if someone tries to help you
3
4
34
@phry
Lenz Weber-Tronic
2 years
I just took a stab at implementing `use` support for RTK Query and just from looking at the code changes, this is mostly moving code around - almost writing no new code. It is probably the cleanest attempt at suspense support we've made so far.
3
5
33
@phry
Lenz Weber-Tronic
4 years
@mxstbr <>Sometimes I write strings like this so TypeScript is happy</>
0
0
34
@phry
Lenz Weber-Tronic
1 year
I just spent two hours debugging a user-submitted bug in Apollo Client that turned out to just be an `async` Client Component. This stuff is dangerous :(
2
1
33
@phry
Lenz Weber-Tronic
3 months
Very happy to see that this is fixed in React 19 - finally useSyncExternalStore will batch together with other state updates and not cause double renders. (Think a Redux dispatch and a setState call at the same time.)
2
2
33
@phry
Lenz Weber-Tronic
3 years
@TheAnkurTyagi Go by the React Docs Beta. Don't touch anything that shows class components or switch..case reducers. You want hooks. Always check library homepage & docs before starting external tutorials. @eggheadio and @frontendmasters are your friend, udemy will waste your time.
4
0
33
@phry
Lenz Weber-Tronic
1 year
According to some people on tech Twitter, these people hate each other. They don't, at all. Such a wholesome discussion. People project too much 😊
@ReactAdvanced
React Advanced London 🗓 Oct 25 & 28, 2024
1 year
And some more:)
Tweet media one
Tweet media two
Tweet media three
Tweet media four
0
0
17
3
3
33
@phry
Lenz Weber-Tronic
3 years
Tail recursive types make me fall in love with TypeScript all over again.
3
1
33
@phry
Lenz Weber-Tronic
4 months
@meijer_s I think if you run 0.4, you're safe. Nobody knows how to compile an exploit for that. Everyone who knew retired already :)
0
0
31
@phry
Lenz Weber-Tronic
5 years
Hello! 👋 This is my first post in the #TypeScriptTuesday series. Today, we're going to talk about the basics of #TypeScript Generics. Let's take this (simplified) example type from #Redux Toolkit and let's try to understand it.
Tweet media one
2
13
31
@phry
Lenz Weber-Tronic
4 years
There is some very advanced #TypeScript trickery in this article: Nice to see some more esoteric articles out there :) Thanks to @acemarke for pointing it out to me!
1
14
32
@phry
Lenz Weber-Tronic
1 year
@leeerob @kentcdodds Every other framework will be behind, because for a lot of the features the only "documentation" is the Next.js implementation. (Looking at e.g. the timing specifics behind useServerInsertedHTML - there's no guarantee or doc, the only safe thing to do is doing what Next does.)
1
2
33
@phry
Lenz Weber-Tronic
5 years
@thekitze Yup. But then there's also this part in the Redux docs - and there's a direction that Redux is pushing (no switching reducers, no type constants, no hand-written action creators, hooks where possible). It's a bit like bashing on React for Class Components in 2019.
Tweet media one
2
1
32
@phry
Lenz Weber-Tronic
4 months
Can we all pack up the pitchforks and go home? This is being taken care of. No more mob needed. That PR is being rolled back in a major release, as agreed by the new maintainer in the PR, days ago.
@marcysutton
Marcy Sutton Todd
4 months
@matteocollina @phry It was a legit transfer according to Jesse, they have worked together before. I have a call with the new maintainer later today to try and sort some things out. Seems like some checks and balances are needed!
2
2
57
3
2
31
@phry
Lenz Weber-Tronic
1 year
Meeting my @apollographql team in person for the first time in half a year 😊 Let's watch (and give) some amazing talks at #reactadvanced !
Tweet media one
0
3
31
@phry
Lenz Weber-Tronic
2 years
@tannerlinsley @EddyVinckk And not building any confidence in his product. Why would I use anything when the person I have to interact with for help is behaving like this?
0
0
31
@phry
Lenz Weber-Tronic
2 years
@t3dotgg @acemarke @rawdeg If your CTR is not 100% and not every single person is actively watching every single minute of that video, that nuance is lost. And without that nuance, it's a fake screenshot of a non-existing tweet spreading fake news for clicks. There's no way to frame that positively.
1
0
30
@phry
Lenz Weber-Tronic
5 years
@thekitze Those Redux jokes are getting about as old as the style of Redux you're joking about... could be a good idea to take another look at what modern Redux (with Redux Toolkit and Hooks) looks like ;) Just saying, by now you're devaluing yourself more than you are devaluing Redux...
7
0
30
@phry
Lenz Weber-Tronic
8 months
PSA: If you've been using one of the experimental packages for Next.js App Router support with Apollo Client, urql or React Query, please update that dependency ASAP. All three were vulnerable for an XSS attack, and all three packages just published a new version with a fix.
2
13
30
@phry
Lenz Weber-Tronic
5 months
@tlakomy But horrible minification. Always depends on context.
1
0
25
@phry
Lenz Weber-Tronic
2 years
For the #firefox users out there: My extension to use #prettier in every input or textarea in your browser just got approved! Get it now at
2
4
30
@phry
Lenz Weber-Tronic
3 years
@Eldiabolo1921 @LiveOverflow The scary thing is that paypal is using weird domains like this for years in legit mails. Just looked at a legit mail from them:
0
1
30
@phry
Lenz Weber-Tronic
5 years
This #TypeScriptTuesday , we're going to take a look at #TypeScript 's interfaces. Interfaces are different from types and both have their strengths in different situations. Let's take a look. This is just some interface definition - again an example from the #redux types: 🧵👇
Tweet media one
2
6
29
@phry
Lenz Weber-Tronic
3 years
Did some docs work on RTK-Query earlier and came up with this neat little trick to refetch unauthorized queries on login & re-fetch queries with errors. This invalidation model really allows for a lot of nice patterns 🥳
Tweet media one
2
8
29
@phry
Lenz Weber-Tronic
10 months
And then it's probably one line of runtime code behind all those types 😅
@PatrickJS__
PatrickJS
10 months
Looking at TanStack Router source thinking Link component would be simple to start out. Yeah, I guess I don't know TypeScript
Tweet media one
38
24
479
2
0
29
@phry
Lenz Weber-Tronic
2 years
@brian_d_vaughn @reactjs @typescript You are skipping the (null).
1
0
29
@phry
Lenz Weber-Tronic
3 years
This. The airbnb eslint config was a good guide/starting point 5 years ago. Times have changed. Don't use it any more for new projects. Only add lint rules you have understood and agree with.
1
4
28
@phry
Lenz Weber-Tronic
6 months
If you're not using strict mode, you're probably closer to the feature set of TS 1.5 than the feature set of the language everyone else knows as modern TypeScript.
@mattpocockuk
Matt Pocock
6 months
If you're not using strict: true in your tsconfig.json, you're not using TypeScript.
Tweet media one
77
70
731
2
5
28
@phry
Lenz Weber-Tronic
2 years
I just realized that I like both advanced Typescript and Regex and now I'm questioning if I'm maybe just in for the weird syntax. 🤯
3
0
27
@phry
Lenz Weber-Tronic
10 months
@TkDodo "If we decide not to use the main feature of the library, the library is not very useful"
1
0
26
@phry
Lenz Weber-Tronic
5 years
@kcnaija @dan_abramov Gotta add this gif or I fear I won't get over this.
2
0
27
@phry
Lenz Weber-Tronic
3 years
@kentcdodds "resource" ? Although I'd still go with "api route". JSON has not been there forever and that's what Accept headers are for.
2
0
26
@phry
Lenz Weber-Tronic
5 years
@mpjme @typescript Oftentimes, those not-a-real-errors are valid concerns in the future. Can you share it?
0
0
27
@phry
Lenz Weber-Tronic
6 years
@kentcdodds guess what the first three tweets when I opened twitter were... ;)
Tweet media one
1
1
26
@phry
Lenz Weber-Tronic
2 years
@kevinrwhitley @fullStackChris_ @mpocock1 To be honest, the "Dan himself" argument gets very annoying at this point. Dan has created Redux and then maintained it for one year. Mark and Tim are now maintaining Redux for 6 years. Dan is an expert on how the React team wants you to use React, and they want you to not use
3
2
24
@phry
Lenz Weber-Tronic
5 years
@flybayer "Ruby on Rails equivalent" is a very bad choice of words: I'm a JavaScript/php developer, when I read Ruby, I stop reading. You might think about reword that to "a JavaScript Ruby on Rails equivalent".
4
1
25
@phry
Lenz Weber-Tronic
2 years
Ticket of the day *sigh* Sometimes you can just be sarcastic-helpful I guess?
Tweet media one
3
0
25
@phry
Lenz Weber-Tronic
1 year
I'm happy to announce that @jerelmiller and I will be doing a talk at #ReactSummit : "GraphQL in 2023 - still relevant?" We'll be talking about things that were unique to GraphQL in the past, how the ecosystem has changed, and what's so special about GraphQL today.
Tweet media one
2
4
26
@phry
Lenz Weber-Tronic
5 years
@thomasfindlay94 @rickhanlonii To become a billionaire just by working hard you would have to work for 40 years, 80 hours a week, never take a day off at $6000/hour (after taxes). There is no "earned" or "hard" way one hour of your life is worth more than a month of another person's life. It's always unfair.
3
1
26