Dead Code Shouldn’t Exist: How We Removed 28k Lines of Code, One Knip at a Time

This ad is not shown to multipass and full ticket holders
React Advanced
React Advanced 2026
October 23 - 26, 2026
London, UK & Online
Upcoming event
React Advanced 2026
React Advanced 2026
October 23 - 26, 2026. London, UK & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

Ever wonder how much of your codebase is just… hanging around, doing nothing? At Sentry, we did too - and the answer was more than we expected. In this talk, I’ll share how we used Knip, a powerful tool for detecting unused files, exports, and dependencies, to declutter our frontend codebase. You’ll learn about the practical steps we took to safely identify and remove dead code, how we integrated Knip into our workflows, about unexpected edge-cases and what we learned along the way. Whether you're maintaining a massive monolith or just looking to tidy up, this session will give you practical strategies - and maybe a little inspiration - to start decluttering your own codebase, one Knip at a time.

This talk has been presented at Web Engineering Summit 2026, check out the latest edition of this Tech Conference.

Dominik Dorfmeister
Dominik Dorfmeister
35 min
11 Jun, 2026

Comments

Sign in or register to post your comment.
Video Summary and Transcription
The Talk covers the importance of building a design system for efficient component usage and maintaining a clean codebase for faster shipping. It discusses the impact of unused code on development efficiency, challenges in cross-module usage analysis with TypeScript, and the use of KNIP for identifying and removing unused code elements. KNIP aids in code cleanup, optimization, and dependency removal, enhancing code cleanliness and efficiency. The Talk also addresses challenges in adapting to KNIP in CI workflows, caution in dynamic codebases, and the potential for KNIP to expand to other cleanup tasks beyond code size reduction.

1. Speaker Introduction at React Summit

Short description:

Speaker introduces himself and his experience at the conference. He mentions his online presence and the topics he usually covers like TypeScript and React. Talks about his involvement in an open-source project and asks about the audience's familiarity with it. Expresses excitement to discuss Dead Code Elimination and his work at Sentry to enable efficient shipping and consistent product delivery.

I've been to this conference for the last four years, so this is my fifth time at React Summit and Chase Nation. But it's actually the first time that I'm giving a talk in person here. So I'm really happy and excited to talk to you about Knip and Dead Code Elimination today. My name is Dominik. I'm a software engineer from Vienna. And as you just said, you can also find me as tkdoto online almost everywhere, mostly on Blue Sky these days. And I also write a blog at tkdoto.eu, mostly about TypeScript and React.

And of course, also about React Query or 10-Stack Query, which is the open source library I've been maintaining for over the last five years. Now, quick question. Raise your hand if you've worked with 10-Stack Query or React Query before. Oh, that is a lot of hands. That's great. I always love to see that. I'm not here to talk about 10-Stack or React Query today, though. I do have some 10-Stack stickers, if you want, so you can come to me afterwards and grab those. And there are also some more talks tomorrow about 10-Stack. But today I want to talk to you about something different.

Beginning of last year, I joined the design engineering team at Sentry, where we're not working directly on a specific part of the product, but instead our goal is to make ship happen. We want to enable other teams to ship efficiently. And in that sense, our team actually aims to make two things possible. We want to make it easy for product teams to ship the right things efficiently and consistently. And at the same time, kind of guard them towards not shipping the wrong or inconsistent things and get them into that pit of success per default.

2. Building Design System and Code Efficiency

Short description:

The speaker discusses the importance of building a design system for efficient component usage. They highlight the need for constraints like TypeScripts, Linting, and documentation to shape the code base effectively. The speaker emphasizes the impact of unused code on development efficiency and the importance of maintaining a clean codebase for faster shipping.

And to get there, a big part of our team's job is building a design system, which is a library of consistent components with good APIs and documentation and type safety and accessibility built in. Because those components need to be easily discoverable so that product developers can compose them and ship them fast without breaking things.

And for the second point, we're actively working on constraints. That means setting up TypeScripts and Linting, but also project structure and documentation, teaching, and also AI skills these days play a big role in that. So in a nutshell, we try to get the overall code base of Sentry that has kind of grown organically over the last 10 years into a good shape so that both humans and their agents can ship fast.

And that means we have to touch a lot of parts of the code base regularly. Like for example, my very first PR at Sentry, touched over 900 files because I enabled the no implicit any compiler setting, which I was really surprised that this was not turned on to be honest. And while I did this and some other improvements, I was sometimes wondering if I should maybe sanity check the things that I was touching or at least find out where they are used.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Fast – Engineering Lessons From ~15 Years of Tech Startups
React Advanced 2024React Advanced 2024
27 min
Scaling Fast – Engineering Lessons From ~15 Years of Tech Startups
Hey, we'll discuss scaling fast and engineering lessons learned in the last 15 years of tech startups. Scaling involves three things: business, team, and tech. Business scalability relies on sales and customer acquisition costs. Engineering is a tool the business uses. Scaling the team is vital as tech problems are often people problems. Team structure affects architecture and product development process. Organize teams based on purpose, not technology. Spend less time being blocked by other teams. Ship features without getting blocked. Own your own mess. Focus on product engineering partnership. Build faster using feedback cycles. Build appropriate solutions for your use case. Let go of ego and experiment with different approaches. Engineers own their own mess. Avoid work in progress. Finish the work and focus on fixing it later. Have a conversation before writing code. Scaling the tech is easier than you think. Pick an off the shelf design. Save innovation for core parts. Pick existing solutions. Focus on solving the problem. Don't waste time trying to predict future scale. Scale will surprise you. Do what works for your business. Push back on unnecessary complexity. Understand the cost of ideas. Modify the situation to fit existing design. Architecture is like a dependency graph on your code. Reduce architectural complexity by organizing code based on what it does. Use vertical models and avoid creating excessive dependencies. On the client, use vertical modules. On the back end, consider a service-oriented architecture. Start with a monolith and transition to microservices if necessary. Use folders instead of microservices when you have a small team. Use vertical models and contract or type-driven development to define clear APIs and interfaces. Avoid highly interconnected code and duplication. Focus on data structures to avoid complexity and the need for translation layers. Building translation layers can lead to slow user experience. Vertical teams aligned with vertical code allow for fast problem-solving, full control of features, and efficient data handling. Understanding the entire domain enables faster development with fewer bugs.
How I Automated Code Changes for 100 Repositories: Getting Started With Codemods
React Day Berlin 2022React Day Berlin 2022
28 min
How I Automated Code Changes for 100 Repositories: Getting Started With Codemods
This Talk discusses automating code changes for Android repositories, utilizing tools like JSCodeShift and Abstract Syntax Tree. The speaker shares a real use case example of maintaining a design system library and making changes to a component. The talk emphasizes the importance of automating repetitive tasks and using the power of abstract syntax tree for code changes. The Q&A session covers topics like source code formatting, TypeScript support, and cultural embedding of code mods. The talk concludes with insights on when automation is worth it and the limitations of code mods for monorepo changes.
Next Generation Code Architecture for Building Maintainable Node Applications
Node Congress 2023Node Congress 2023
30 min
Next Generation Code Architecture for Building Maintainable Node Applications
Today's Talk focused on code architecture, modularization, and scaling in software development. The speaker discussed the benefits of separating code by domain and using tools like NX to improve productivity and enforce modular architecture. They also highlighted the importance of automating library creation and configuration. Additionally, the Talk covered code scaling and deployment strategies, including caching and automated code migrations. The speaker emphasized the flexibility and scalability of Fastify and the advantages of using a monorepo for front-end and back-end development.
Sub Agent Context Sharing: How to Enable Effective Sub Agents for Coding
AI Coding Summit 2025AI Coding Summit 2025
15 min
Sub Agent Context Sharing: How to Enable Effective Sub Agents for Coding
Cloud Code introduced sub-agent feature for better performance. Understanding the sub-agent concept and its role. Challenges of sub-agents in direct implementation. Parent agents' limited visibility. Efficient context management with MD files for sub-agents' tasks and reports boosting Cloud Code performance. Guidelines for creating useful sub-agents with specific MCP tools. Utilizing TweakScene MCP for scene design reference and defining rules for sub-agent tasks. Setting goals, output format, and rules for sub-agents. Building a chat GPT replica with chat.cn UI and Versatile AIS. Integration with VerCell AI SDK for seamless implementation.
The Future Stack of Code Review
JSNation 2023JSNation 2023
22 min
The Future Stack of Code Review
The Talk discusses the challenges of code reviews and the need to redefine the code review process in light of changes in software development. It emphasizes the importance of collaboration, security, performance, and clean code in the new stack of code review. The Talk also highlights the benefits of automating code review comments and optimizing the code review process. Overall, the Talk aims to build a better code review process that promotes collaboration and improves the quality of software development.
Road to Zero Lint Failures: Tackling Code Quality Challenges at Scale
React Summit US 2023React Summit US 2023
11 min
Road to Zero Lint Failures: Tackling Code Quality Challenges at Scale
This Talk discusses the journey from thousands of Lint failures to zero in a codebase at Linton that is over 80 years old. The approach involved implementing rules, incentives, and tooling to address the issue. The tool called Checkup was used to visualize ESLint failures by team and lint rule, providing accountability and responsibility. The efforts resulted in cleaning up over 6,000 lint failures, with 55 contributors, and a 30% increase in perceived code quality.

Workshops on related topic

Production-Ready Apps with AI Agents
React Summit 2025React Summit 2025
102 min
Production-Ready Apps with AI Agents
Featured Workshop
Alex Shershebnev
Alex Shershebnev
Coding assistants are already changing the way we develop code, and in several years they are expected to completely change how developers interact with code and write it. In this workshop, I'll share tips and best practices on using such tools as we develop the production-ready app with Zencoder.
Bring Code Quality and Security to your CI/CD pipeline
DevOps.js Conf 2022DevOps.js Conf 2022
76 min
Bring Code Quality and Security to your CI/CD pipeline
Workshop
Elena Vilchik
Elena Vilchik
In this workshop we will go through all the aspects and stages when integrating your project into Code Quality and Security Ecosystem. We will take a simple web-application as a starting point and create a CI pipeline triggering code quality monitoring for it. We will do a full development cycle starting from coding in the IDE and opening a Pull Request and I will show you how you can control the quality at those stages. At the end of the workshop you will be ready to enable such integration for your own projects.
AI-Powered Code Review
TechLead Conf Amsterdam 2026: Adopting AI in Orgs EditionTechLead Conf Amsterdam 2026: Adopting AI in Orgs Edition
77 min
AI-Powered Code Review
Workshop
Serhii Yakovenko
Serhii Yakovenko
Every engineering organisation is experimenting with AI coding assistants, but few have built production-grade LLM integrations into their core developer infrastructure. I have such an experience, and I will share real patterns from deploying an AI-powered code review system across a 400+ person engineering organisation (~200 developers) — covering a competitive evaluation of 4 tools across 18 dimensions, building a webhook-based review architecture with slash commands and auto-review, evolving context enrichment from static rules to AI-powered document selection, managing a 4-model fallback chain on Vertex AI, and measuring impact through a feedback dashboard. Attendees will leave with a battle-tested
playbook for integrating LLMs into their own engineering workflows — not as toys but as production infrastructure.

Workshop Structure
1. The Code Review Bottleneck at Scale
2. Tool Evaluation — 4 Candidates, 18 Dimensions
3. Architecture — Webhook Server & Auto-Review
4. Context Enrichment — From Path Rules to AI- Document Selection
5. Model Strategy — Migration & Fallback Chain
6. Measuring Impact — Feedback Dashboard