vouch-opensource / krell

Simple ClojureScript React Native Tooling
Eclipse Public License 1.0
673 stars 37 forks source link

Extending Krell For Use with Expo #147

Closed bnert closed 1 year ago

bnert commented 2 years ago

In the README, the project mentions that Krell can be extended for integrating with Expo. I have been attempting to do so and am running into issues, mainly around the app root never being registered.

Do you have an example of how to provide your own index.js file for integrating with other tools?

Let me know if you need more context (code snippet, error messages, etc...), and I can provide them.

Thanks in advance, and thanks for the cool utility 🙂

hkjels commented 2 years ago

I'm also wondering about this. I'm not so much interested in Expo, but I'm interested in running Krell with React-native-web. I think I've made some progress; at least on bundling with Metro, but I'm still not familiar enough with the inner workings of Krell to see how far I am from a working solution.

To your issue specifically @bnert , have you tried something like:

// Whereas 'app' is the root-node of your html-template
AppRegistry.runApplication(appName, {rootTag: document.getElementById('app')});

at the bottom of your krell_index.js file?

bnert commented 2 years ago

@hkjels thanks for the suggestion.

I am still running into issues, mainly around the web build. The error has to do with the process global variable not existing on the web, due to some of the associated krell compat/repl code requiring access toe the process variable.

hkjels commented 2 years ago

I'm going to look more into how all this works. Doing a production-build works fine, so it's just the REPL-connection stuff that does not pan out for obvious reasons.

bnert commented 1 year ago

I'm going to close this out, given krell isn't focused on web.