Closed tyagow closed 5 years ago
+1 it's a HOT mess right now :D
Extending the above question, I see that you have created folders for each react component and added the component in the index.js of the folder. Any specific reason for this? Would it not be more convenient for searching to have component files like Messages.js instead of Messages/index.js?
Usually it's a folder per component. For instance:
Whereas the index.js for the MessageList exports the MessageList component, the index.js for the MessageItem exports the MessageItem component. Both components can either be used in the Message's index.js file or exported from there for the Message folder being a feature folder.
With the other naming convention, these file names would become redundant when having the prefix all the time:
After all, I think there are many ways of doing it. The shorter names with their explicit use cases are my way of doing it. The index.js and the feature folder approach is more driven from Node.js development.
However, I am open for changes to make it appealing for everyone :)
I liked the way we could include the storybook, css and spec file in the same folder. I would consider using this in my app. Thanks :+1:
Maybe I need to write about these different approaches at some point :)
hi, sorry i meant to say that it's quite difficult to work in editor, for example you won't know which file is open ; because every file title will be index.js
, :) one more point - why don't you use ' apollo-boost '
i mean any specific reason ?.
thankyou :)
Wouldn't it be possible to include the path for the search? Something like "Mess MessageList" in the case of the example? That works for me in Sublime at least.
@Gamezpedia I see apollo-boost only as a zero-configuration package for getting started quickly with a prototype, but not for using it in larger applications where you have to add your own specific configuration. Does it make sense?
First, nice project. I love it! I would like to ask you, what you recommend as folders structure for a bigger project? Your Components folder already has a lot of components. I'm new to React and would be great to know your opinion about it... Maybe we can come up with some ideas and I would happily send a PR with the new layout. A new branch, maybe?