Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRITECHSRM-234 Restructure files by feature #41

Merged
merged 4 commits into from
Apr 15, 2016
Merged

BRITECHSRM-234 Restructure files by feature #41

merged 4 commits into from
Apr 15, 2016

Conversation

lclarksl
Copy link

No description provided.

@ghost
Copy link

ghost commented Apr 15, 2016

I wonder if renaming the component JSX files within each (PascalCase for components) subfolders to index.js would be a good idea? To clean up the imports. So "../components/AppHeader/AppHeader.jsx" becomes "../components/AppHeader".

@lclarksl
Copy link
Author

lclarksl commented Apr 15, 2016

I thought you needed to include the file extension when importing jsx files?

@ghost
Copy link

ghost commented Apr 15, 2016

Yes that's true, it means the components would need a .js extension. What do you think? It's what Facebook (controversially) do as well - kriasoft/react-starter-kit#52. It appears the only reason is to shorten the references on imports.

Perhaps leave it for now and we can reassess! :shipit:

@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import Checkbox from 'material-ui/lib/checkbox';
import SessionStatusService from '../services/SessionStatusService';
import SessionStatusService from '../../../services/SessionStatusService';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going up three levels looks a bit fragile to me?

@ghost
Copy link

ghost commented Apr 15, 2016

As long as the structure means that ../../../ makes sense, then :shipit:

@lclarksl lclarksl merged commit f77f4cf into master Apr 15, 2016
@jebbinSCL jebbinSCL deleted the restructure branch April 19, 2016 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants