🖥️
Full stack Typescript
  • Introduction
  • Environment setup
    • Workspace setup
    • Firebase project setup
    • Firebase authentication
    • Firestore database
    • Firebase hosting
  • Getting started with the Full Stack Typescript repository
  • Workflows
    • Development workflow
      • Component workflow
        • Application Toolbar component example
      • Feature workflow
        • User Account feature example
      • Function workflow
        • Update User Account callable function example
      • Web3 function workflow
        • Query Ethereum balance callable function example
    • Icon workflow
    • Push notification workflow
    • PWA workflow
      • Making your PWA Google Play Store ready
    • Secret Manager API workflow
  • Styleguide
    • Architecture overview
    • Naming conventions
    • Single-responsibility principle
  • Change Requests
    • Request for changes
      • Change pattern proposal template
      • New pattern proposal template
Powered by GitBook
On this page
  1. Styleguide

Single-responsibility principle

The single-responsibility principle (SRP) is a computer programming principle that states that "A module should be responsible to one, and only one, actor."

PreviousNaming conventionsNextRequest for changes

Last updated 2 years ago

Rule of one

Apply the to all components, services, and other symbols. This helps make the application cleaner, easier to read and maintain, and more testable.

Do define one thing, such as a service or component, per file.

The goal is to make the code more reusable, easier to read, and less mistake-prone. As the application grows, this rule becomes even more important.

single responsibility principle (SRP)
Rule of one