Created
October 15, 2019 13:22
-
-
Save ghaskins/02396da6a7ae7a3bfc2106b8166be76e 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
(ns react-native.core | |
(:require [reagent.core :as r] | |
[react-native.utils :refer [adapt] :as u])) | |
(def app-registry (u/get-obj "AppRegistry")) | |
(def view (adapt "View")) | |
(def image (adapt "Image")) | |
(def touchable-highlight (adapt "TouchableHighlight")) | |
(def text (adapt "Text")) | |
(def flat-list (adapt "FlatList")) | |
(def safe-area-view (adapt "SafeAreaView")) | |
(defn alert [title] | |
(.alert (u/get-obj "Alert") title)) | |
(defn register-componnet [name root] | |
(.registerComponent ^js app-registry name #(r/reactify-component root))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment