Skip to content

Instantly share code, notes, and snippets.

@pastelsky
Last active March 30, 2017 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pastelsky/f808530d31f947859676e281c7bf0d49 to your computer and use it in GitHub Desktop.
Save pastelsky/f808530d31f947859676e281c7bf0d49 to your computer and use it in GitHub Desktop.
Idiomatic naming of components
// Extends DOM functionality
function SearchInput /* vs. S̶e̶a̶r̶c̶h̶ */ ({ ... }) { }
// Structural components
function ProductCard /* vs. P̶r̶o̶d̶u̶c̶t̶ */ ({ ... }) { }
function AutoSuggestionList /* vs. A̶u̶t̶o̶S̶u̶g̶g̶e̶s̶t̶i̶o̶n̶s̶ */ ({ ... }) { }
function FilterBar /* vs. F̶i̶l̶t̶e̶r̶s̶ */ ({ ... }) { }
//Page Level components
class SearchPage /* vs. S̶e̶a̶r̶c̶h̶ */ extends Component { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment