The “Rule of 10” for functions, components and modules

  • If a function has >10 lines of code, break out into multiple functions.
  • If a component has >10 functions, break out into multiple components.
  • If a module has >10 components, break out into multiple modules.

--

--

--

I build tools for creativity 🧩. CEO of @Weld_io , a #nocode tool for marketers. Father of two. Feminist. Fan of espresso and movies. Still learning.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tom Söderlund

Tom Söderlund

I build tools for creativity 🧩. CEO of @Weld_io , a #nocode tool for marketers. Father of two. Feminist. Fan of espresso and movies. Still learning.

More from Medium

WHAT ARE THE MOST POPULAR PROGRAMMING LANGUAGES?

Most used programming languages for analysis

What Are Some of the Most Popular Programming Languages for 2022?

What Are Some of the Most Popular Programming Languages for 2022?

7 JavaScript Concepts You Should Be Familiar With As a Developer