Ben Lorantfy

309 posts

Ben Lorantfy banner
Ben Lorantfy

Ben Lorantfy

@benlorantfy

Staff Software Developer, @ApplyBoard, Software Consultant, Lorantfy Inc. Ex-Frontend Lead, @postmedia_io.

Kitchener, Ontario Katılım Şubat 2014
124 Takip Edilen66 Takipçiler
Sabitlenmiş Tweet
Ben Lorantfy
Ben Lorantfy@benlorantfy·
I've released `nestjs-zod` v5.1! This release has several new features and bug fixes, but the headline feature is zod codec support 🎉 Check out the release notes here: github.com/BenLorantfy/ne… #zod #nestjs
English
1
0
1
79
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@GergelyOrosz I agree we need a new name for building with AI when you review and take professional responsibility for the results. The term “vibe coding” is just making other engineering disciplines take software engineering even less seriously than they already do.
English
0
0
0
13
Ben Lorantfy
Ben Lorantfy@benlorantfy·
I've released `nestjs-zod` v5.1! This release has several new features and bug fixes, but the headline feature is zod codec support 🎉 Check out the release notes here: github.com/BenLorantfy/ne… #zod #nestjs
English
1
0
1
79
Gergely Orosz
Gergely Orosz@GergelyOrosz·
Some of the most unexpected fallouts of an AWS outage: 1. Postman stopped working: an API development tool built to be an alternative to simple tools like curl. 2. Eight Sleep customers couldn’t use their beds to change positions / set or keep temperature
English
126
223
5K
507.9K
DHH
DHH@dhh·
So much corporate red tape can be traced to a single anecdote where someone fucked up and their manager didn't have the balls to tell them directly. So they made a policy instead. Don't be that coward. Just tell Ben.
English
67
104
1.7K
106.1K
Ben Lorantfy
Ben Lorantfy@benlorantfy·
Planning on releasing `nestjs-zod` `v5` this Thursday 👀 #discussioncomment-14087325" target="_blank" rel="nofollow noopener">github.com/BenLorantfy/ne… #zod #nestjs
English
1
0
2
81
Fernando Rojo
Fernando Rojo@fernandorojo·
i like to wrap destructive actions with areYouSure(), which opens a dialog and lets the user confirm or cancel
Fernando Rojo tweet media
English
30
35
1.2K
97.6K
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@wesbos @pagebakers What if I want to be “careful about exposing certain internals” for folders inside my app? What makes packages special that they’re the only ones that get to carefully define a public interface? Do I need to move code to a library to properly implement information hiding?
English
2
0
1
451
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@t3dotgg Actually maybe they _are_ following web standards 👀
Ben Lorantfy tweet media
English
0
1
24
259
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@t3dotgg While it’s odd it doesn’t use img, this image probably counts as decorative, since it has accompanying text, and probably doesn’t need alt text: w3.org/WAI/tutorials/…
English
2
0
45
3.7K
Theo - t3.gg
Theo - t3.gg@theo·
I think it's pretty telling that the official "webcomponents dot org" site uses a div + background_image tag for the logo (with no alt tags btw)
Theo - t3.gg tweet media
English
30
2
693
88.2K
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@acemarke Shouldn’t we ideally be writing effects that are okay to run again if the dependencies change?
English
0
0
0
103
Mark Erikson
Mark Erikson@acemarke·
Agreed that this is both an obscure and also pretty critical aspect missing in React's docs. Given that `useEffect` checks references, and state hooks return stable setters, that behavior aspect _ought_ to be described in both the API docs and some usage guide page.
English
3
1
17
14.4K
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@AdamRackis tailwind is good but csshooks has almost the same benefits and avoids the “ugliness” debate. It’s underrated IMO
English
0
0
1
85
Adam Rackis
Adam Rackis@AdamRackis·
Hahaha remember those idiotic couple of months when we'd argue whether Tailwind was ok to use and worry if uwu my html looks un-pretty now 😢 👉👈
English
12
1
79
6.9K
Ben Lorantfy retweetledi
Cory House
Cory House@housecor·
These days, many old JavaScript projects have converted to TypeScript. If you haven’t yet, here’s a compelling stat: A survey of six months worth of postmortems at AirBnb found 38% of them could have been prevented by TypeScript.
English
8
9
138
10K
Ben Lorantfy retweetledi
Theo - t3.gg
Theo - t3.gg@theo·
People seem to be really confused about the "right way" to fetch data in React, specifically "fetch on render" vs "render as you fetch". I tried my best to diagram the difference
Theo - t3.gg tweet media
English
58
119
2.2K
245.5K
@chance.dev 🦋
@chance.dev 🦋@chancethedev·
Stuff like this reinforces my view that the idea of readability is entirely subjective and not worth discussing in most cases. I'd 100% write it the first way but I wouldn't suggest it in a code review if someone opted for the second.
Cory House@housecor

The most common needless use of `let` I see: Setting an initial value, followed by mutations. This is hard to read because it requires the reader to hold the initial value in their head while reading, and monitor any mutations along the way. Solution: Call a function instead.

English
26
8
222
57K
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@housecor Might be a pipe dream, but if you just use inline styles, you don’t even need to ask the user to import a CSS file. I’ve always disliked making consumers import CSS because it risks causing them problems with bundlers, scoping, etc. Importing CSS is not even valid EcmaScript 😞
English
1
0
1
19
Ben Lorantfy
Ben Lorantfy@benlorantfy·
@housecor Just inline styles is easiest on the consumer. Customizing the styling can be done via a theme prop. This was my approach: #L58" target="_blank" rel="nofollow noopener">github.com/BenLorantfy/zo… If you need hover/focus, you can almost do that with inline styles by copying this trick: css-hooks.com/docs/introduct…
English
1
0
1
27
Cory House
Cory House@housecor·
I'm creating a reusable React component that I plan to publish via npm. I'm considering styling it via Tailwind. But I'm having a hard time finding an example of someone doing this. Is Tailwind a good fit for a reusable component published on npm? Why or why not?
English
95
10
276
98.5K