Fork me on GitHub
#cljsrn
<
2016-09-17
>
orther01:09:46

I am doing my first testing of cljs+rn and it has kinda all worked nicely

orther01:09:03

curious if anyone has experience and/or suggestions for cljs tvOS dev

orther01:09:15

I see a few libs but hard to tell without jumping in

orther01:09:58

I'll be jumping in this weekend but curious if anyone has suggestions for what to look at or if I should avoid tvOS with cljs all together for whatever reasons

boorad03:09:09

nice talk, good job.

drapanjanas12:09:15

@surreal.analysis try (def emoji (r/adapt-react-class (.-default Emoji))) I do not know why this works, but maybe it has something to do with export default Emoji; in react-native-emoji?

surreal.analysis13:09:25

Woo! Thanks so much @drapanjanas, that solved the issue

danielstockton18:09:13

im trying to get up and running with fighweel and re-natal, getting java.lang.NoClassDefFoundError: com/google/common/base/Predicate

danielstockton18:09:17

anyone else had the same problem?

danielstockton18:09:06

seems to indicate i don't have guava on the classpath

surreal.analysis19:09:27

@danielstockton What did you do to create the project / run the application?

danielstockton19:09:53

re-natal init project -i om-next

surreal.analysis19:09:41

In the root of the project, can you run:

lein deps
and see if that fixes your issue? If it still doesn’t, can you run
lein deps :tree
and paste the output here?

danielstockton19:09:37

lein deps gives me a 'Problem opening jar ... google-closure-library ... ' error

surreal.analysis19:09:15

Can you paste the full error?

danielstockton19:09:27

sure, 2 seconds

danielstockton19:09:59

added it to the gist

danielstockton19:09:22

maybe i should try clearing my .m2 directory and running it again

surreal.analysis19:09:51

Yeah, that’d be a solid start

surreal.analysis19:09:00

I’d also check and see if /home/daniel/.m2/repository/org/clojure/google-closure-library/0.0-20160609-f42b4a24/google-closure-library-0.0-20160609-f42b4a24.jar exists and what it’s permissions are

danielstockton19:09:34

deleting .m2 worked, managed to start figwheel

danielstockton19:09:41

thanks for getting me there

danielstockton19:09:07

should the app reload if i make changes to the src files? or is there another trick to that?

danielstockton19:09:53

nvm, i see it works if i change core.cljs, i was changing state.cljs which has defonce

danielstockton19:09:56

any blog posts anywhere that have tips on making the state reloadable?

surreal.analysis19:09:49

@danielstockton When you’re making changes to the state, are there ways in the app to already make that change?

surreal.analysis19:09:17

For example, let’s say your state is:

{:name “Daniel”}
Do you have a :set-name event?

danielstockton19:09:56

just starting out from the basic template, my app doesn't have anything yet

surreal.analysis19:09:26

Got it. So you want to modify db.cljs then see that reflected in your app?

danielstockton19:09:49

its called state.cljs, maybe thats an om-next thing

surreal.analysis19:09:07

Oh, right. I’m much more familiar with re-frame than om

surreal.analysis19:09:24

FWIW, in re-frame there’s an “initialize-db” event

danielstockton19:09:27

it does defonce app-state and defonce reconciler, i guess i need to have a way to redefine those

surreal.analysis19:09:38

You could always get rid of the once

surreal.analysis19:09:51

But that will mess with future hot reloading

danielstockton19:09:46

i think the defonce is a good idea, actually im wondering why im worrying about this now (https://anmonteiro.com/2016/01/writing-om-next-reloadable-code-a-checklist/)

danielstockton19:09:01

i should just set up my initial state and create methods that change it at runtime

surreal.analysis19:09:34

Yes, you definitely want defonce long term, but if you want to make some state, a quick fix is to delete the once, save, add the once back, and save

jorda0mega20:09:02

@vikeri thank you for your clojutre talk. described exactly the pains that I’m having with re-natal

edwthomas23:09:57

Hey guys, I’m having the same problems as @surreal.analysis but with the Navigator.NavigationBar component.

(def ReactNative (js/require "react-native"))
(def navigator (r/adapt-react-class (.-Navigator ReactNative)))
(def navbar (r/adapt-react-class (.-Navigator.NavigationBar ReactNative)))

(defn app-root []
  [navigator {:initial-route routes
              :render-scene  #(r/as-element (scene %))
              :navigation-bar [navbar {:route-mapper (my-route-mapper)}]}])

edwthomas23:09:19

oops…messed up the formatting there. sorry 🙂

edwthomas23:09:47

I’m trying to set the navigationBar property in my Navigator and I get an error saying “Invalid prop NavigationBar supplied to Navigator, expected a ReactNode"