Reputation: 738
I'm want to create a large scale mobile app in react-native, after some research and read the various articles from medium and other websites I'm total confused what architecture i'll used to make my application better or developer friendly architecture. Please help me to find the best react-native architecture to build large scale application. Thanks in advance!!
Upvotes: 0
Views: 587
Reputation: 1
Clean architecture in very trendy at the moment. Maybe you can check this out : https://github.com/eduardomoroni/react-clean-architecture
Clean architecture let you separate concern of your app.
Upvotes: 0
Reputation: 19
for sure, there're different ways to organize your app. In our team, we worked closely with our mobile department to create an architecture for our current React Native projects. The key point here is to split responsibilities across special components dedicated to doing the only one thing. We divided our components into several layers to achieve a better understanding of what part of business logic should go where:
In the article, we described every step with code snippets as examples. Take a look.
The approach of arranging business logic helps to clearly know what goes where not polluting containers or simple views with state and methods. Hope it will help you in your future projects!
Upvotes: 0
Reputation: 884
There isn't a single possibility of how you want to structure your files. There are various recommendations on how do to so, but they basically boil down to making sure to have a logical file structure, trying to group files that "work together" in a folder, and trying not to keep files that have nothing to do with each other in the same one. Use the base folder to keep global project files, and the deeper in the navigation stack, the deeper the files should be (If there is only one path through which they can be accessed). Name reducers/sagas/etc accordingly, and you should be well on your way. But most importantly, there is no correct way, only the one that makes the most sense for you. If it seems cluttered, you can always reorganize, so don't worry too much now about scaling, and focus on starting your application (But make sure it isn't a complete mess!).
Upvotes: 1