For further actions, you may consider blocking this person and/or reporting abuse
Read next
Unlocking the Power of Web Components and Custom Elements for Reusable UI Design
Abhay Singh Kathayat -
Deploying Next.js + Pocketbase to a single Fly.io machine
Nick -
Why TypeScript is the Future of JavaScript Development: Benefits and Adoption
Abhay Singh Kathayat -
Boost Your Web App's Speed: JavaScript Performance Optimization Techniques
Abhay Singh Kathayat -
Top comments (1)
Most of my code is reusable. Recently I've been splitting code in roughly 2 categories: small reusable modules (~90% of code), and connectors, which are sometimes big, but really dumb modules, whose purpose is to connect reusable modules together and provide dependencies. Connectors could be easily thrown out, rewritten, copy‐pasted, duplicated with changes, etc, because they don't contain much logic. This kind of setup allows you to structure your code in many different ways, for many different environments at once, quickly restructure for a new environment, provides good testability, etc. And yes, a lot of my small modules are reused, e.g. for testing or to run in multiple places or multiple environments (e.g. both client side and server side).