Skip to content

Development Guide

Subha Das edited this page Mar 12, 2021 · 7 revisions

CSS

All CSS should be in modules, meaning it only affects the component itself. Only non-module css files should be global styles in index.css and page-level styles (See more below).

Components

Each component has its own folder, which contains one css and jsx file. The css file should be in the format component.module.css. Please use functional components and hooks, not class components. Components should use ES5 functions:

export default function RandomComponent

Shared Components

All shared components used across multiple pages should go in the shared components folder.

Pages

Each page component has a jsx and module.css file as well, but it also has a non-module css file (format: randomComponentSpecific.css) for any page-specific descendant styles. Each page has a components folder for components that belong only to that page.

JS Syntax Preferences

Please use let and const, not var. For non-anonymous functions, please use es5 functions. For anonymous functions, es6 syntax is preffered because its shorter.

Clone this wiki locally