Repository navigation
How should I structure my project? #2443
|
It is my first time using this library, and I am considering using it but is not clear to me how to structure the project. This is more of a conceptual question about structuring the project and I would like to hear from you. |
Replies: 1 comment
|
There is no single right structure. It depends on how different your web and native apps need to be. Most multi-platform apps keep one codebase and share as much as they can. For small differences, use If you start a new app, Expo sets this up for you, and Expo Router lets you share screens and navigation across platforms. Closing, as this is an old question. Feel free to open a new discussion if you have a more specific question. |
There is no single right structure. It depends on how different your web and native apps need to be. Most multi-platform apps keep one codebase and share as much as they can. For small differences, use
Platform.OS. When a component or screen needs a different version for web, add a*.web.jsfile next to it. See the multi-platform guide.If you start a new app, Expo sets this up for you, and Expo Router lets you share screens and navigation across platforms.
Closing, as this is an old question. Feel free to open a new discussion if you have a more specific question.