Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package.json "react-native" field instead of "browser" #3

Closed
siuying opened this issue Jan 8, 2016 · 9 comments
Closed

Update package.json "react-native" field instead of "browser" #3

siuying opened this issue Jan 8, 2016 · 9 comments

Comments

@siuying
Copy link

siuying commented Jan 8, 2016

As react-native has added support of "react-native" field to package.json, maybe this package can modify that field instead of browser?

I'm trying to build an app have share code based between web app, electron and react-native app, limit the hacks on react-native seems proper.

@mvayngrib
Copy link
Member

@siuying yea, I was the one added the "react-native" field support in react-native, but i see that they only released it in 0.17. Would you like to take a stab at a PR? For example, perform react-native depedency version detection, and choose the field accordingly?

@siuying
Copy link
Author

siuying commented Jan 8, 2016

I just made a tiny change and it work for my purpose: siuying@a3385e2 .

After some testing I figure react-native is not the best solution for my problem, so I didn't really use it. But apps like popcorn time for react-native is definitely something I want to build later 😁

@mvayngrib
Copy link
Member

popcorn time in react-native is a good idea :) I've gotten webtorrent working in react-native, so it's definitely possible. I'm curious, why did react-native turn out to be no the best solution for your problem?

@siuying
Copy link
Author

siuying commented Jan 8, 2016

I have written an app use apple tv to drive a remote peerflix and work well, if it can run peerflix itself then it would save the time to open the companion mac app...

I'm writing a hybird app which contains both web and native element, run on desktop (electron) and mobile. I'd also need to run pouchdb/couchdb for p2p sync. It'd be great if I can use one code base, reuse the business logic across app. I figure the business logic i can reuse is not that much, and prefer to write them again in Swift rather than fighting with the react packager / webpack / npm install.

@mvayngrib
Copy link
Member

@siuying sounds cool! If you end up open sourcing it, send me a link. I know what you mean about fighting the tooling

@vespakoen
Copy link
Contributor

This one is fixed by https://github.com/mvayngrib/rn-nodeify/pull/8 and can be closed

@siuying
Copy link
Author

siuying commented Feb 24, 2016

@mvayngrib I've made an experiment to use JXcore to run peerflix

@mvayngrib
Copy link
Member

@siuying very cool! I actually read your article before your comment :) If you're interested in comparing JXCore with React Native, you can try the same experiment with rn-nodeify. I know for a fact that webtorrent worked in React Native with rn-nodeify a few months ago.

@mvayngrib
Copy link
Member

currently both fields are being updated, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants