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

Support for create-react-native-app / Expo #34

Closed
davetobin opened this issue Jun 9, 2017 · 5 comments
Closed

Support for create-react-native-app / Expo #34

davetobin opened this issue Jun 9, 2017 · 5 comments

Comments

@davetobin
Copy link

davetobin commented Jun 9, 2017

Is there a way to tie in Cavy with create-react-native-app (https://facebook.github.io/react-native/docs/getting-started.html)?

This doesn't seem to use the AppRegistry and I'm not sure how go about adding Cavy. Here are the files given by default:

image

It would be good to be able to add Cavy and try it out at the most basic level and build from there.

EDIT: I see a similar issue to #23 when I add my own main.js
undefined is not an object (evaluating '_this2.context.testHooks.add')

@jalada
Copy link
Contributor

jalada commented Jun 12, 2017

Hi @davetobin! create-react-native-app uses Expo which is wrapping your app already. We've not tried Cavy with Expo yet, but I'll put it on the list so we can get back to you. If you make any headway in the mean time please let us know!

@jalada jalada changed the title Cavy with create-react-native-app from Official RN docs Support for create-react-native-app / Expo Jun 12, 2017
@mandx
Copy link

mandx commented Jun 26, 2017

As a workaround, I'm hooking up Cavy right in the main App.js file. Instead of exporting as default the App component, my default export is the AppWrapper component from the example. What the CRNA entrypoint does is call AppRegistry.registerComponent with the default export of the root App.js file.

@jalada jalada added this to the 0.4.1 milestone Sep 1, 2017
@jalada jalada added this to Up next in Cavy development Sep 1, 2017
@jalada jalada closed this as completed in b2a91d4 Sep 6, 2017
@jalada jalada removed this from Up next in Cavy development Mar 26, 2018
@donnes
Copy link

donnes commented Oct 5, 2018

Hello @mandx can you provide an example about this workaround?
Other question, you're using CRNA or expo init?

Thanks!

@mandx
Copy link

mandx commented Oct 5, 2018

@donnes I'm sorry, I don't have access to that code anymore; my previous comment is from a bit more than a year ago, and I don't have access to that code anymore. And not even I can make sense of that comment right now, apparently Cavy has changed quite a bit since then, so I'm not sure if it still applies...

@donnes
Copy link

donnes commented Oct 5, 2018

@mandx Ohh, ok you're right!
Thanks!

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

No branches or pull requests

4 participants