Benjamin Lesné's Avatar

Benjamin Lesné

@benjaminlesne.bsky.social

Web Developer | mainly with React https://benjamin-lesne.dev/

47 Followers  |  358 Following  |  65 Posts  |  Joined: 06.11.2024  |  1.791

Latest posts by benjaminlesne.bsky.social on Bluesky

Preview
The Useless useCallback Why most memoization is downright useless...

📚 Whenever I see useCallback, I wonder: why do we need it here? And a lot of the times, when I look deeper, I see that it actually doesn’t do anything. I think a lot of code-bases would be better of just not memoizing at all - and then let the compiler do it for you:

28.07.2025 16:22 — 👍 74    🔁 13    💬 9    📌 3
Preview
The “State of Devs” results are in! • Josh W. Comeau Friendly tutorials for developers. Focus on React, CSS, Animation, and more!

Absolutely fantastic write-up by @joshwcomeau.com on the State of Devs survey results. Contains a lot of correlations that aren't even in the main report!

www.joshwcomeau.com/email/2025-0...

05.07.2025 00:09 — 👍 7    🔁 2    💬 0    📌 0

I turn on `verbatimModuleSyntax` and jest starts to fail because our jest.config is in TS with ESM syntax, but package.json doesn’t say type:module so now it assumes CJS and everything is on fire either way 🔥. This is what hell must feel like 😂

10.07.2025 18:00 — 👍 22    🔁 1    💬 3    📌 0

Now that the project is live, I’m looking for new opportunities!

If you're looking for a developer who can turn complex ideas into powerful tools, my DMs are open!

Reposts appreciated 🙏

#WholeLifeCarbon #EmbodiedCarbon #PolicyScience #OpenScience

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0

Also, special thanks to the team at @kuleuvenuniversity.bsky.social and Technische Universität Graz - @martinroeck.com, Nicolas Alaux, Delphine Ramon, Alexander Passer, Karen Allacker and Ronny Moreas.

The collaboration with all of you was fantastic.

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0

A huge thank you to Shadwa Eissa for the amazing data visualization and overall design! I closely collaborated with her to build the app.

10.07.2025 10:01 — 👍 1    🔁 0    💬 1    📌 0

On the tech side, I built the app entirely from scratch with:

🔹 Reactjs (@react.dev)
🔹 TanStack Router (@tanstack.com)
🔹 React Query (@tkdodo.eu)
🔹 Shadcn/ui (@shadcn.com)
🔹 Recharts
🔹 Flask
🔹 DuckDB (@duckdb.org)

10.07.2025 10:01 — 👍 4    🔁 0    💬 1    📌 0
Preview
Analysis of Life-Cycle Greenhouse Gas Emissions of EU Buildings and Construction Learn more about the analysis of Life-Cycle Greenhouse Gas Emissions of EU Buildings and Construction

The data comes from building LCA and building stock modelling of KU Leuven and TU Graz developed as part of the ‘Analysis of Life-cycle Greenhouse Gas Emissions and Removals of EU Buildings and Construction’ study funded by the European Commission

See more on the About page of the Scenario Explorer

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0

- The material with the highest emissions?
👉 Line chart

- How emissions change over time for Residential buildings?
👉 Stacked area chart

- Compare emissions between two scenarios?
👉 Stacked bar chart

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0

Users can view emissions for each building type, country, material, and more!

You can download the displayed data as an image or as a spreadsheet and visualize it with three type of graphs in the app.

If you want to know...

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0
Preview
WLC Scenario Explorer Interactive tool that visualizes carbon reduction strategies across Europe's entire building stock. Analyze emissions by building life cycle stages, building types, and more.

👉 Explore the web app at ae-scenario-explorer.cloud.set.kuleuven.be

👉 The code and related papers via linktr.ee/wlcscenarioe...

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0
Video thumbnail

🚀 The WLC Scenario Explorer is now LIVE!

This open-source tool explore different possible scenarios for whole life cycle greenhouse gas emissions of buildings across Europe.

More info below! 🧵👇

10.07.2025 10:01 — 👍 0    🔁 0    💬 1    📌 0
Preview
State of Devs 2025

In case you need a distraction from the current news cycle, part 1 of the State of Devs survey results is now available!

2025.stateofdevs.com/en-US

23.06.2025 00:08 — 👍 7    🔁 2    💬 1    📌 0

Years of Experience vs Job Happiness.

There is a bump after 10 years. Why? Survivor bias?

23.06.2025 07:40 — 👍 0    🔁 0    💬 1    📌 0
Preview
Pull requests · getsentry/sentry Developer-first error tracking and performance monitoring - Pull requests · getsentry/sentry

I'm at about -18k lines of code for the @sentry.io codebase thanks to knip 🙌

github.com/getsentry/se...

30.04.2025 08:06 — 👍 47    🔁 3    💬 2    📌 1
Preview
useState for one-time initializations Why you shouldn't rely on useMemo for guaranteed referential stability but prefer useState instead

Today I learned why this:

const value = useRef(null)
if (!value.current) {
value.current = init()
}

_can_ be better than:

const [value] = useState(init)

Hint: StrictMode is involved 😜

Guess it’s time to update my blogpost / write a new one.

26.04.2025 08:43 — 👍 46    🔁 3    💬 6    📌 0

And look at that brand new @intellijidea.com plugin by @wordman.dev for highlighting arktype types 🙌

18.04.2025 16:12 — 👍 9    🔁 1    💬 1    📌 0
Preview
GitHub - beekeeper-studio/beekeeper-studio: Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows. Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows. - beekeeper-studio/beekeeper-studio

📦 beekeeper-studio / beekeeper-studio
⭐ 18,448 (+31)
🗒 TypeScript

Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows.

15.04.2025 18:02 — 👍 10    🔁 1    💬 0    📌 0
JSX Over The Wire — overreacted Turning your API inside-out.

⚛️📝 New on Overreacted: JSX Over The Wire overreacted.io/jsx-over-the...

15.04.2025 15:54 — 👍 284    🔁 51    💬 31    📌 15

why bluesky "feeds" don't work, a thread

12.04.2025 15:47 — 👍 508    🔁 78    💬 18    📌 27
Preview
GitHub - fuma-nama/fumadocs: The beautiful docs framework with Next.js. The beautiful docs framework with Next.js. Contribute to fuma-nama/fumadocs development by creating an account on GitHub.

📦 fuma-nama / fumadocs
⭐ 3,746 (+83)
🗒 TypeScript

The beautiful docs framework with Next.js.

13.04.2025 17:02 — 👍 8    🔁 1    💬 0    📌 0
Preview
GitHub - BenjaminLesne/bluesky-feed-template: Template to create your custom bluesky feed Template to create your custom bluesky feed. Contribute to BenjaminLesne/bluesky-feed-template development by creating an account on GitHub.

Ouais, le template de Bluesky est franchement pas clair.
J’en ai pondu un plus simple ici :
github.com/BenjaminLesn...

Et j’explique le tout, étape par étape, ici :
blog.benjamin-lesne.dev/blog/How-to-...

En espérant que ça t’aide (même 4 mois plus tard)

13.04.2025 18:47 — 👍 1    🔁 0    💬 0    📌 0
Preview
memo – React The library for web and native user interfaces

@gsathya.bsky.social I just saw in a talk yesterday (by
@mxmlnznr.bsky.social) that the React Compiler uses === to compare with cached values. IIRC, memo in React uses Object.​is instead, which is not quite the same. What's the reasoning behind this being different?

09.04.2025 07:15 — 👍 32    🔁 1    💬 1    📌 0
Post image

Two cool things in this snippet:

1. You can use 'glob' from Node instead of a library! (still experimental, available in 22+)

But glob returns an async iterator, which can be annoying to work with. So...

2. Array.fromAsync lets you turn an async iterator into an array. Beautiful.

01.04.2025 11:20 — 👍 104    🔁 11    💬 5    📌 1
Preview
GitHub - microsoft/libsyncrpc: synchronous RPC communication with callbacks for Node.js synchronous RPC communication with callbacks for Node.js - microsoft/libsyncrpc

my final project as part of my tenure at Microsoft, aside from that NPM patch (lol), is this lil' guy: github.com/microsoft/li...

Just a small, but v v fast IPC lib that lets you make synchronous calls to a child process from node, while the child can execute callbacks *from you* before you return.

31.03.2025 23:05 — 👍 39    🔁 4    💬 1    📌 1
Preview
My Open Source Origin Story A brief story of how I got into Open Source

📚 I haven’t blogged in quite a while (new job I guess), but I got so many questions about how I got started with open source at React Paris that it was finally time for me to write that down:

31.03.2025 09:21 — 👍 70    🔁 6    💬 5    📌 0
React Query API Design: Lessons Learned - Dominik Dorfmeister
YouTube video by BeJS React Query API Design: Lessons Learned - Dominik Dorfmeister

Amazing talk! 👏

#react-query

28.03.2025 20:25 — 👍 2    🔁 0    💬 0    📌 0
Raccourcis VSCode partie 1 #programming #coding
YouTube video by Juste le code Raccourcis VSCode partie 1 #programming #coding

Les parties suivantes se trouvent ici:
www.youtube.com/watch?v=tKkP...

28.03.2025 09:17 — 👍 0    🔁 0    💬 0    📌 0
React Query API Design: Lessons Learned - Dominik Dorfmeister
YouTube video by BeJS React Query API Design: Lessons Learned - Dominik Dorfmeister

🎥 You can already watch my talk "React Query API Design - Lessons Learned: The Extended Version" from #ReactParis on YouTube: www.youtube.com/watch?v=l3Px...

25.03.2025 13:40 — 👍 27    🔁 5    💬 0    📌 2

Great talk, and TIL about this cool trick

Pragmatism: use "Error" instead of "unknown"

But gives the ability for users to opt out of this opinionated choice with TS declaration merging

26.03.2025 12:14 — 👍 22    🔁 4    💬 1    📌 0

@benjaminlesne is following 20 prominent accounts