This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-01
Channels
- # aatree (3)
- # admin-announcements (2)
- # beginners (42)
- # boot (142)
- # cider (12)
- # cljsrn (11)
- # clojure (126)
- # clojure-greece (2)
- # clojure-poland (7)
- # clojure-russia (81)
- # clojure-uk (10)
- # clojurescript (81)
- # component (27)
- # core-typed (2)
- # cursive (18)
- # euroclojure (1)
- # gorilla (1)
- # hoplon (85)
- # immutant (2)
- # jobs (3)
- # leiningen (2)
- # off-topic (49)
- # om (151)
- # onyx (19)
- # parinfer (3)
- # re-frame (36)
- # reagent (2)
- # spacemacs (5)
- # untangled (32)
- # yada (9)
Has anyone been successful with using sente on an actual device? The source code attempts to call enc/get-window-location
, but I’m getting this error undefined is not an object (evaluating ‘taoensso.encore.get_window_location.call)
. It will run fine when debugging via the local server running; but once I try to bundle the app onto the device, it breaks.
The call on client side looks something like:
(sente/make-channel-socket! "/chsk"
{:type :ws
:host “"})]
Hi! Has anybody tried to use https://github.com/aksonov/react-native-router-flux with Reagent? The router component throws an error: component property is not set for key=root
, but I don’t understand why. I mean, I gave a look at the source and I fund the relevant assertion, but I think I have correctly set the property that causes the assertion fail...
@stepugnetti: I don't know about your problem (sorry!) but I'd love to hear how you like it in relation to reagent, once you get it working
in general I don't see why a react component wouldn't work with reagent
could you share the code you use to call the router?
@stepugnetti: I’m looking at implementing NavigationExperimental instead, it seems to map really well to re-frame if you would use that: https://github.com/ericvicenti/navigation-rfc/blob/master/Docs/Navigation.md
@vikeri: Cool! However, I’m trying to keep as close as possible to https://github.com/reactjs/react-router/tree/latest, and aksonov repo looked promising.
Okok! NavigationExperimental is being integrated into the main ReactNative branch repo now though fyi
@pesterhazy: I’m quite happy with Reagent for the moment, both for React and React Native. To use the router I first had to import the js library into cljs as a my-own.react-native-router
namespace. Then, more or less:
(require ‘my-own.react-native-router)
(def router* (adapt-react-class (.-Router js/ReactNativeRouter)))
(defn router
[& [opts & children :as args]]
(into [router* opts] children))
I tried adding several properties into opts, like :key
and :ref
(to inspect what is going on), but I could not get it working up to now.
@vikeri: Thanks! I’ll keep it in mind, in case I fail with this approach. I am developing the same app for the web and ios/android, so keeping the APIs of my external libs as close as possible from one side to the other is rather important...@stepugnetti: Alright, that makes sense then.
greetings, gentlemen, just a sanity check: Im I doing "cljs-react-native" right?
(ns ...
(:require-macros
[natal-shell.components :refer [text list-view]]
[natal-shell.data-source :refer [data-source clone-with-rows]]))
(rum/defc my-view []
(let [ds (-> (data-source {:rowHasChanged #(not= % %2)})
(clone-with-rows ["aaa" "bbb" "ccc"]))]
(list-view
{:dataSource ds
:renderRow #(text {} %)})))
does anything seem odd to you (besides the ds init is in render
instead of init
)?