Reputation: 55
I’ve built a small app with React Native and it looks awesome, but I was wondering - can I just export it for web (HTML/JavaScript) instead making a separate code in ReactJS for it? And if it’s possible, what are the pros and cons? BTW I used a free UI kit for the developing. Thanks!
Upvotes: 5
Views: 5002
Reputation: 535
You can use Expo to build for any platform: IOS, Android, Web
For the web, you can use expo build:web
It creates a production ready static bundle in the web-build/
directory
Here is the full document for the web
Upvotes: 1
Reputation: 4590
You have two options:
Use react-native-web and share 90% the same source code, between native and webapp.
Use web react
and share some components.
More info: https://blog.bitsrc.io/6-ways-to-share-and-reuse-react-components-6d80e2fd16cd
Upvotes: 4