Fork me on GitHub
#cljsrn
<
2016-12-09
>
charafau12:12:55

Hello everyone I was redirected here from #clojurescript .

charafau12:12:07

I've seen some presentations about clojurescript and react native and decided to give it a try. I got sample app with re-natal and android but now I wanted to add some material design so I installed reat native material design components according to this https://github.com/react-native-material-design/react-native-material-design and when I'm importing namespace in clojure with (set! js/MaterialDesign (js/require "react-native-material-design")) I got an 'unknown named module' error. Are there some tips how to set it up somewhere ?

charafau12:12:35

now I ran re-natal use-component react-native-material-design and then re-natal use-figwheel. but still has that error

savelichalex12:12:19

@charafau are you restart lein and application?

charafau12:12:38

yes I did that

charafau12:12:51

I did react-native run-android too

savelichalex12:12:13

please show your .re-natal file

charafau12:12:31

{
  "name": "FutureApp",
  "interface": "reagent6",
  "androidHost": "localhost",
  "iosHost": "localhost",
  "envRoots": {
    "dev": "env/dev",
    "prod": "env/prod"
  },
  "modules": [
    "react-native-material-design"
  ],
  "imageDirs": [
    "images"
  ]
}

savelichalex12:12:52

ok, just for the future re-natal use-component add this module to modules section in .re-natal, re-natal use-figheel generate index.ios.js and index.android.js based on .re-natal files

savelichalex12:12:14

also check that you install that module through npm

charafau12:12:50

thanks, let me try

charafau13:12:12

I installed module with npm, done re-natal use-figwheel once again, run react-native run-android and lein figwheel android

charafau13:12:19

but still I have that error on startup

vikeri13:12:42

@charafau I had some issues with not finding an installed library recently, using boot-react-native though, but I solved it by rm -rf node_modules and then yarn.

charafau13:12:47

@vikeri I’ve seen your tutorial on youtube, maybe I should try that steps? I tried with re-natal tutorial on github

charafau13:12:58

but I think that I’m just missing something..

vikeri13:12:08

@charafau Hmm, which tutorial?

vikeri13:12:19

@charafau Alright, well I’ve switched to boot-react-native now, so can’t help you with re-natal unfortunately

savelichalex13:12:21

@charafau another option it is don't forget to completly stop react-packager before run application

savelichalex13:12:36

because they read from generated index files

charafau13:12:58

is there some way to clean build ?

charafau13:12:05

i mean, npm

savelichalex13:12:37

not sure that understand what is it clean build)

vikeri13:12:10

@charafau You can start the packager like this npm start -- --reset-cache but I’m not sure that will help

charafau13:12:05

thanks I need to move to home

charafau13:12:11

but I will try with my free time 🙂

charafau13:12:15

thank you guys

tianshu14:12:03

sometimes it's difficult to use reagent will react native since reagent's function is not the same as react component.

tianshu14:12:16

but I really like hiccup.