Skip to content

Components Style Guidelines

Baz edited this page May 16, 2016 · 1 revision

Components Style Guidelines

Coding style for components development.


Define paths relative to root

Even if a sub-component is in the same folder as the current component, import it relative to root like this:

import Markets from '../../markets/components/markets';

rather than

import Markets from './markets';

This way imports remain consistent throughout the app, and more importantly, it makes it easy to move things around without figuring out which path structure to use.


Clone this wiki locally