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

Formatters cannot be installed #8

Open
amazing-Mantse opened this issue Dec 10, 2019 · 0 comments
Open

Formatters cannot be installed #8

amazing-Mantse opened this issue Dec 10, 2019 · 0 comments

Comments

@amazing-Mantse
Copy link

amazing-Mantse commented Dec 10, 2019

I am following the sample example.

In my main I have:

(ns tech.matterindustries.titan.mobile.core.main
 (:require [react]
        [react-native :as rn]))

(def <> react/createElement)

(defn renderfn [props]
   (<> rn/View
           #js {:style #js {:backgroundColor "#FFFFFF"
                 :flex 1
                 :justifyContent "center"}}
      (<> rn/Text
             #js {:style #js {:color "black" :textAlign "center"}}
             (str "HELLO Mobile"))))

;; the function figwheel-rn-root must be provided. It will be called by
;; react-native-figwheel-bridge to render your application.
;; You can configure the name of this function with config.renderFn
(defn figwheel-rn-root []
     (renderfn {}))
(defn renderfn [props]
   (<> rn/View
           #js {:style #js {:backgroundColor "#FFFFFF"
                 :flex 1
                 :justifyContent "center"}}
      (<> rn/Text
             #js {:style #js {:color "black" :textAlign "center"}}
             (str "HELLO"))))

;; the function figwheel-rn-root must be provided. It will be called by
;; react-native-figwheel-bridge to render your application.
;; You can configure the name of this function with config.renderFn
(defn figwheel-rn-root []
     (renderfn {}))`

The android.cljs.edn

^{:open-url false :npm {:bundles {"dummy.js" "index.js"}}} {:main core.main}

My index.js

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);

cljsExports = {};
cljsExports["react"] = require('react');
cljsExports["react-native"] = require('react-native');
cljsExports["create-react-class"] = require('create-react-class');

var figBridge = require("react-native-figwheel-bridge");

figBridge.shimRequire(cljsExports);
figBridge.start({appName:   "my_mobile_app",
              optionsUrl: "http://localhost:8081/target/public/cljs-out/android/cljsc_opts.json"});`

The deps.edn

{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}
           com.bhauman/figwheel-main {:mvn/version "0.2.1-SNAPSHOT"}}
  :paths ["src/main" "target" "resources"]}

And is the error that I get:
WhatsApp Image 2019-12-10 at 5 42 15 AM
image
image

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

1 participant