Created
October 15, 2019 13:36
-
-
Save ghaskins/86edd136392f841819300eca2da2255c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/react_native/core.cljs b/src/react_native/core.cljs | |
index ee71f8e..e155491 100644 | |
--- a/src/react_native/core.cljs | |
+++ b/src/react_native/core.cljs | |
@@ -1,8 +1,7 @@ | |
(ns react-native.core | |
(:require [reagent.core :as r] | |
- [react-native.utils :refer [adapt] :as u])) | |
- | |
-(def app-registry (u/get-obj "AppRegistry")) | |
+ [react-native.utils :refer [adapt] :as u] | |
+ ["react-native" :as rn])) | |
(def view (adapt "View")) | |
(def image (adapt "Image")) | |
@@ -15,5 +14,5 @@ | |
(.alert (u/get-obj "Alert") title)) | |
(defn register-componnet [name root] | |
- (.registerComponent ^js app-registry name #(r/reactify-component root))) | |
+ (rn/AppRegistry.registerComponent name #(r/reactify-component root))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment