Skip to content

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

@carocad

Description

@carocad

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions