Boilerplate for React projects by Locomotive.
npm install
# watch
npm run start
# build
npm run build
# build svg
npm run build:svg
# build staging
npm run build:staging
# build production
npm run build:production
To create a component, you can duplicate the Example
component.
- It's defined as a functional component and imports its own scss file.
- It accepts 3 CSS class related props:
option
,utility
andstatus
. - These props will be formated and added to the component className with the
renderClasses
utility. - Options will be namespaced with
-
, utilities withu-
and statuses withis-
. - You must defined your class props as arrays.
- Any changes to these class props will trigger a component render.
Name |
---|
Redux |
React Router |
React Transition Group |
- The boilerplate is based on Create React App.
- It uses styles from our Locomotive Boilerplate.