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

prefer defining react var instead of assuming it on global namespace #6

Open
carocad opened this issue May 21, 2017 · 2 comments
Open

Comments

@carocad
Copy link

carocad commented May 21, 2017

Hey @dmotz,
I saw that in the code you use js/ReactNative to get the current instance of ReactNative. However that way the user is forced to put ReactNative in the global scope, which shoudnt be a requirement IMHO. That is specially problematic if a user require the macros of this library before setting that up.

I think there are some libraries that define the js/ReactNative as global but I dont think is the case for all cljs libs out there. I would propose something like reagent approach. Basically if the object is already defined globally then rely on that, otherwise require it.

Let me know your thoughts :)

@dmotz
Copy link
Owner

dmotz commented May 24, 2017

Makes sense, will address in the next update.

@carocad
Copy link
Author

carocad commented May 24, 2017

thanks 👍

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

2 participants