Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 592 Bytes

JavascriptReact.md

File metadata and controls

28 lines (20 loc) · 592 Bytes

theTribe's Javascript with React code style

theTribe's Javascript with React code style is base on our javascript code style and the airbnb code style with the following changes/additions:

Function components

Function components should be declared as arrow functions.

Good:

import React from 'react';

const Component = (props) => (
    <div />
);

Bad:

import React from 'react';

function Component (props) {
    return <div />;
}

Why: This is enforced for consistency in all components declarations.