Rahul Vyas
Rahul Vyas

Reputation: 28720

Project structure for react native including native iOS,Android?

I am trying to get my hands on react native and I'm confused at this point that how we can create a structure something like this

MainProject-Folder
|
|iOS-Native-Project-Folder
|
|Android-Native-Project-Folder
|
|Shared-React-Native-Project-Folder/Files-For-Both (iOS/Android)

I've googled but didn't find any article/blog post explaining this kind of structure. I just want to create a basic structure in which I can have few screens shared code between android/iOS, And at some places I want to have native objective-C/Swift/Java code for iOS/Android.

If someone can guide me in right direction it would be great.

Upvotes: 1

Views: 161

Answers (1)

tajammul1996
tajammul1996

Reputation: 199

if you have created your project using

react-native init projectName

then you will get iOS and android native directories

just add one more folder as src and keep all the shared code there.

refer the image attached which depicts the same :)enter image description here

Upvotes: 2

Related Questions