Closed kentcdodds closed 9 years ago
That's a good point... I don't use bower_components
in react either. That must be an artifact of angular in my brain... Perhaps you could take that out and put everything I have there in /app up a level. And remove non_bower_components
and call it non_node_modules
.
non_node_modules
is weird though... Maybe you could just be sane and call it vendor
...
non_node_modules
.. I name it vendor
(a folder for 3rd party libraries which are not in either npm nor in bower).
That's reasonable.
Where to put major components (the ones bound to URLs)
/src/components
folder (e.g./src/components/issues.jsx
) - better for small projects/src/pages
folder (e.g./src/pages/issues.jsx
,/src/pages/questions.jsx
) - might be better for small projects/src/issues/index.jsx
,/src/issues/new/index.jsx
) - might be better for medium-size projects/src/account/login.jsx
,/src/account/profile.jsx
,/src/account/settings.jsx
)Where to put unit test files
test
folder in project's root (e.g./test/components/navbar-test.js
)test
folder in each source folder (e.g./src/components/test/navbar-test.js
)/src/components/navbar-test.js
)test
or__test__
folder (see React source code)@koistya:
@kentcdodds:
@koistya:
@kentcdodds:
@koistya:
@kentcdodds:
@koistya:
@kentcdodds:
@koistya: