victorkvarghese / react-native-boilerplate

🚀 Type Based Architecture for developing React Native Apps using react, redux, sagas and hooks with auth flow
MIT License
605 stars 207 forks source link

Request to add helper components directory #7

Closed miguelHx closed 5 years ago

miguelHx commented 5 years ago

Would be nice to have a helper components directory, with a sample sub directory including a component. Would containers go with that as well? Or a separate directory for helper component's containers?

I am proposing adding a components directory.

Borrowing from https://hackernoon.com/structuring-projects-and-naming-components-in-react-1261b6e18d76 it seems that it may be wise to put both containers and components under the components directory, while keeping screens directory separate. Screens will use helper components.

So, the structure would look something like this:

├── Entrypoint.js
├── actions
├── api
├── config
├── components
  └── Form
      ├── FormView.js
      ├── FormContainer.js
      ├── index.js
      └── styles.js
├── actions
├── lib
├── navigation
├── package.json
├── reducers
├── sagas
├── screens
├── store
└── utils

Would like some feedback on this approach.

victorkvarghese commented 5 years ago

@miguelHx I had added components folder, but got ignored in the push because the folder was empty