Skip to content

Standards

Ryan Johnson edited this page Oct 3, 2018 · 2 revisions

Standards

Do Not Prefix Component Names

Given that the majority of public React component libraries do not prefix their exported components, and the lack of any solid pros/cons of prefixed vs unprefixed (aside from the number of characters to type), it's best to go with the implied industry standard of unprefixed components.

👍 Do

export class Checkbox extends React.Component { ... }
export class Menu extends React.Component { ... }
import { Checkbox, Menu } from 'helix-react';

👎 Don't

export class HxCheckbox extends React.Component { ... }
export class HXMenu extends React.Component { ... }
import { HxCheckbox as Checkbox } from 'helix-react';
import { HXMenu as Menu } from 'helix-react';
Clone this wiki locally