Building Blocks

Learn about the structure of the ScandiPWA codebase

The ScandiPWA theme is separated into several subdirectories with specific responsibilities. This organization is enforced to ensure that the codebase is consistent and easy to navigate.

  • component: contains definitions of reusable React components defined throughout the theme

Componentschevron-right
  • query: defines a helper class for each GraphQl query that the theme needs

GraphQL Querieschevron-right
  • route: like component, but each route is added to the router, ensuring that it appears as a page in the SPA.

Routeschevron-right
  • store: defines the global state of the application using Redux stores

Redux Storeschevron-right
  • style: sets the global styles of the application with SCSS

Global Styleschevron-right
  • type: declares JavaScript data structure types using PropTypes

Type Checkingchevron-right
  • util: utility classes, functions and constants that do not fall in the other categories

The Util Directorychevron-right
circle-exclamation

Last updated