Previewing react-native views using ReactJS in a web browser - reactjs

(Disclaimer: I'd have asked this question in a forum but the react-native website encourages us to ask it on SO.)
Is there a known tool to visually preview xml layouts in a browser? I'm developping a scaffolding tool to generate basic templates so I can prepare applications for customers quicker, and I'd like it to be a web app. Since the layout is very similar between react-native and reactJS, I'd think the effort to show a react-native layout as a reactJS layout is minimal?

A framework for building web apps with React Native compatible API
https://github.com/taobaofed/react-web

Related

Building a desktop admin panel for react native app

I am building a react native app with firebase auth and cloud storage, and I was just wondering if it is possible to make a dashboard for desktops to administrate the users/app? And if it does, how do I do this? Is it in the same build, or do I have to build a new "app" for adminpanel/dashboard?
This is my first time building the adminpanel/backend xD
While it's possible to build web apps with React Native, I wouldn't recommend it. The Layout of a desktop is just way too different from phones to build React Native Apps including web without constantly using Platform.OS. In your question, you even mention that you wan't the dashboard to just be available on the desktop but not on the Phone (which makes sense in my opinion). Since you seem to know a bit about React Native, it should be an easy thing for you to build the Dashboard as a different Application with React for the web only.

Exporting React Native app for web (HTML/JavaScript)?

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!
You have two options:
Use react-native-web and share 90% the same source code, between native and webapp.
Good for non-complex projects;
If your app have native/complex navigation, then it will have issues, because this can't work on web.
Use web react and share some components.
Recommended for complex projects;
If you have a complex native app, share the components can be the best option;
bit.dev can be useful to achieve this solution.
More info:
https://blog.bitsrc.io/6-ways-to-share-and-reuse-react-components-6d80e2fd16cd
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

reactjs for both web and mobile applications

I need to develop the application which will be same for mobile app and web application. I was researching on reactjs.
Can I convert my reactjs code for web-app to react native for mobile application? The way we do in ionic framework(angular)
You can definitely use cordova \ phonegap in order to create an app out of your website, which will make it hybrid but not native (suitable for most site types)
You cannot 'convert' or re-transpile your code to react-native. You have to re-build it using react native. It will be much easier ofcourse because you have a running react system, but still.
I would recommend trying the first option. Good luck!

Cordova or ReactNative. Which should i prefer for this specific project?

I am working on a project that needs to be cross platform for web and mobile. Currently the website is being developed using ReactJS and cordova is being used to make it available on mobile.
But I was wondering if it would maybe be a better choice to use ReactNative for the mobile version because cordova might be more of a hassle than ReactNative is. I dont know if this is true tho.
I know this is kind of an open question that tends to be opinionated but i'd still like to hear some thoughts on this from you guys because its bugging me and I dont have the knowledge and experience of working on both these platforms (cordova and reactnative) to have an educated opinion.
React Native is an abstraction to write native UIs for Android and iOS. Your JS code runs in a JS runtime on the OS, but the UI is rendered as native components. This makes it very different than Cordova.
With React Native, you can use the standard platform components such as UITabBar on iOS and Drawer on Android. This gives your app a consistent look and feel with the rest of the platform ecosystem, and keeps the quality bar high. These components are easily incorporated into your app using their React component counterparts, such as TabBarIOS and DrawerLayoutAndroid.
Also you can find differences here:
https://www.toptal.com/mobile/comparing-react-native-to-cordova
Phone gap vs React Native
http://noeticforce.com/mobile-app-development-cordova-vs-react-native-vs-xamarin

design resource for react native app

We are going to try build an app with react-native for the first time.
We are getting design resources from a different team and they don't have experience with react-native either.
Is there a something that we should request for react-native design resources?
Can you make native app(swift/java based) or react-native app using the same design resources?
I'm not sure this is stackoverflow-ish question, but very real question that I need answer for.
edit
I removed the question over (psd+guide vs image slices)

Resources