This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-06
Channels
- # admin-announcements (17)
- # beginners (78)
- # boot (162)
- # braid-chat (2)
- # cider (20)
- # cljs-dev (9)
- # cljsjs (41)
- # cljsrn (17)
- # clojure (98)
- # clojure-austin (5)
- # clojure-brasil (1)
- # clojure-dusseldorf (1)
- # clojure-greece (1)
- # clojure-ireland (2)
- # clojure-italy (1)
- # clojure-japan (5)
- # clojure-russia (128)
- # clojure-uk (2)
- # clojurescript (29)
- # core-async (1)
- # core-logic (7)
- # css (1)
- # cursive (12)
- # datomic (18)
- # devcards (1)
- # dirac (6)
- # emacs (31)
- # funcool (28)
- # hoplon (208)
- # jaunt (66)
- # jobs (1)
- # juxt (6)
- # lein-figwheel (14)
- # off-topic (9)
- # om (83)
- # om-next (6)
- # onyx (63)
- # overtone (1)
- # parinfer (2)
- # protorepl (23)
- # re-frame (27)
- # reagent (14)
- # ring-swagger (8)
- # slack-help (2)
- # spacemacs (1)
- # untangled (56)
Cannot find - does stateless functional component work with RN? And can we make it using CLJS? Like from here: https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html#stateless-functional-components
var Aquarium = ({species}) => (
<Tank>
{getFish(species)}
</Tank>
);
Never mind - by default with such functional components shouldComponentUpdate will always return true and we’ll loose the biggest win from immutable data structures.
@artemyarulin: have a look at https://github.com/tonsky/rum#mixins
rum.core/static
yep, thanks @misha
The more I look into Rum - the more I like it
whole source code is just a 400 lines
btw - I’m a bit worried: src folder wasn’t changed during last 5 months. Either project is done or it’s kinda partially abandoned. What do you think?
it is not officially RN-ported, and there is nothing new in R afaik, so that'd be my guess of reason
Nice - so it’s complete. Are you considering to officially port it to RN? I know it’s one line change but would be awesome to make a pull request to change it or maybe at least mention it in the README?
the only difference I found with rum between R/RN:
[:div [:span "text"]] ;;no props
works, and this does not:
(touchable-highlight (text "text"))
so you need to provide {}
:
(touchable-highlight {} (text {} "text"))
which is difference between "raw" RN components use via interop, and sablono's dom; and is not actual rum's issue@artemyarulin: I'm not very profound in neither R nor RN nor rum to conclude that's it is in fact ported : ) so my plan was to actually port a piece of app first, and then spread the word
Nice, I’ll play with this as well
I’m trying to write some tests, but I’ve been hitting some issues when running them. i.e. whenever my source code hits a line that calls (js/require “<some required dep>”)
, I get thrown an error. I’m just using cljs.test
’s deftest
, is
, and run-tests
. Listed below some of the other errors I’m seeing as well.
Any suggestions?
when referencing js/DEV__
ReferenceError: __DEV__ is not defined
when trying to require (js/require "react-native")
SyntaxError: Unexpected token …
when including dependency ajax.core
ajax/xml_http_request.cljs:11
(extend-type js/XMLHttpRequest
^
ReferenceError: XMLHttpRequest is not defined
at Object.<anonymous> (<my-dev-directory>/target/ajax/xml_http_request.cljs:11:1)
@jessica: I guess you can try release build - it should generate bundle with all JS embeded
Thank @artemyarulin ! just to clarify, do you mean running lein prod-build? I'll try that out later today and let you know how it goes!