"Unknown named module xmlhttprequest" in clojurescript react-native project using re-natal

95 views Asked by At

In existing project created using re-natal added [cljs-ajax "0.8.0"] and then added following lines in my package.json (https://github.com/JulianBirch/cljs-ajax/blob/master/docs/faq.md#react-native-why-does-bundling-fail-on-my-compiled-project)

"react-native": {
    "xmlhttprequest": false
}

Afterwords ran

lein deps
re-natal use-figwheel
lein figwheel android
react-native run-android

Also added following line into code

[ajax.core :refer [GET]]

However I am getting error "Unknown named module xmlhttprequest"

Please find screenshot as follows

enter image description here

Any help on this issue is appreciated?

1

There are 1 answers

0
anish On BEST ANSWER

Instead of cljs-ajax, i have been using cljs-http. Note that while specifying url of server one needs to give ip address instead of localhost address