JBurkinshaw / sample-react-application

testing sparkgeo sample-react-application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template React App

This is a syntenthesis of best practices when building a new React App in Sparkgeo.

This template is meant for single-page applications (SPAs), as well as Progressive Web Apps (PWAs). If you are looking for Server Side Rendered applications or Static Site Generator, this is not a starter repo you want at all.

Explainers

Component and Library Layout

Directories

Each of these directories are of a single depth.

Directory Description
components All visual components
helpers Immutable JS functions
lib All JS tools that aren't immutable helper functions

Special Config Files

File Name Description
theme.js Theme information for grommet and styled components
App.css All CSS for all core DOM elements
.eslintrc Instructions for linting rules
.eslintignore Where to ignore the linting rules entirely
.prettierrc Configuration instructions for autoformat rules
.serviceWorker.js Autogenerated file by CRA that assists with PWAs

Styling

  • App.css for global rules of HTML elements
    • 1rem = 10px by default
  • Grommet for abstract primitives (Box, Form, FormField, etc)
  • Styled Components for styling at the component-level.

Testing

TBD - Jest for Unit Tests and Integration; Cypress for E2E

Linting and Code Formatting

Linting is based on a subset of AirBNB's style guide and internal best practices.

About

testing sparkgeo sample-react-application


Languages

Language:JavaScript 87.4%Language:HTML 6.4%Language:CSS 6.2%