These are chat archives for CodeHubOrg/discussions

2nd
Apr 2017
trianah
@trianah
Apr 02 2017 19:05
@rinse0ut ok, I've just joined the CodeHubOrg team, I didn't realise I received that email, thanks.
Dave Thomson
@rinse0ut
Apr 02 2017 19:16
:sunglasses: @trianah
wingedeel
@wingedeel
Apr 02 2017 20:18
Omg has anyone had a problem with github and case-sensitivity? Had renamed my React component file names by capitalising the first letter - so from 'app.js' to 'App.js' etc. Worked fine when running locally but when I deployed to Heroku certain files couldn't be found. For example, in the code 'App.js' is referenced but I guess on Heroku 'app.js' was being looked for. Anyway.... I have fixed the problem by entirely renaming my component files. Deployment to Heroku is OK now. What a royal PITA.
wingedeel
@wingedeel
Apr 02 2017 20:28
Out of interest, what is the convention for naming React component files? So if I had a component <SearchBar>, would you name the file it is in SearchBar.js/ searchBar.js/ search-bar.js (or other) ?
Dave Thomson
@rinse0ut
Apr 02 2017 20:38
The Airbnb style guide says to use pascal case: https://github.com/airbnb/javascript/blob/master/react/README.md#naming
@wingedeel Are you running windows locally?
wingedeel
@wingedeel
Apr 02 2017 20:44
@rinse0ut I'm on OSX now.
That airbnb guide is very useful. Been using it for ESlint but not React yet.
wingedeel
@wingedeel
Apr 02 2017 20:56
I have been using PascalCase for naming React component files but the place I worked at recently used kebab-case so I just wondered what the convention was. Just need to pick a convention and stick to it for now! airbnb will do just fine for now.