This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-12
Channels
- # beginners (85)
- # boot (7)
- # cider (7)
- # clara (1)
- # cljsrn (49)
- # clojure (85)
- # clojure-dev (19)
- # clojure-dusseldorf (15)
- # clojure-greece (1)
- # clojure-italy (12)
- # clojure-nl (4)
- # clojure-russia (21)
- # clojure-sanfrancisco (1)
- # clojure-spec (25)
- # clojure-uk (59)
- # clojurescript (29)
- # core-async (5)
- # core-matrix (1)
- # css (1)
- # datomic (1)
- # docker (10)
- # fulcro (12)
- # graphql (21)
- # hoplon (7)
- # jobs-rus (6)
- # jobs_rus (1)
- # lein-figwheel (1)
- # mount (5)
- # off-topic (6)
- # om (4)
- # onyx (8)
- # perun (1)
- # portkey (25)
- # protorepl (7)
- # re-frame (78)
- # reagent (24)
- # ring-swagger (32)
- # rum (3)
- # schema (1)
- # shadow-cljs (122)
- # spacemacs (3)
- # specter (2)
- # sql (1)
- # testing (1)
- # uncomplicate (2)
- # yada (14)
What do people think, should I release 0.8.0 as is or try to understand first if there are some problems still we could fix?
Proper release would probably encourage more to try this
There is probably problems with running this on Node, but I think this is caused by bug in Cljs
I would release a beta version
With an expectation for full release in a month
For some the risk of React 16 will be worth it. And they can help to identify problems.
React 16 support is not merged yet
But I could try fixing the problems with it, but keep the 15 as default
Sorry, i misunderstood
Made some progress with improving test runner just now, found some strange cases where some React things work differently UMD build vs. Node module and Browser vs. Node 😄
Trying to use reagent with React Native + Expo. Getting this error:
No such namespace: cljsjs.react, could not locate cljsjs/react.cljs, cljsjs/react.cljc, or JavaScript source providing "cljsjs.react" in file ..boot-expo/zbu/-d8mh6z/main.out/reagent/impl/util.cljs
Dependencies:
[reagent "0.6.0-SNAPSHOT" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]
[re-frame "0.7.0"]
I have shim namespaces under reagent too. Been stuck on this for a few hours 😕package.json deps:
"dependencies": {
"babel-preset-expo": "^4.0.0",
"expo": "^21.0.0",
"react": "16.0.0-alpha.12",
"react-native": ""
},
Been digging, cannot figure out how Reagent supports closures as callbacks, as in this component from the “simple” example:
(defn color-input []
[:div.color-input
"Time color: "
[:input {:type "text"
:value @time-color
:on-change #(reset! time-color (-> % .-target .-value))}]])
Starting to think React is doing that since it has a custom event mechanism.
Anyone have a clue or pointer to some relevant doc?
what do you mean @hiskennyness - react doesn't have to do anything special to support closures as callbacks - they are just plain js functions
Thx, @mccraigmccraig. I was assuming the initial page got generated as a big wodge of string HTML. I thought I read that somewhere as being a performance win vs assembling the nodes in JS. But I think something interesting is going on: inspecting a React page in the debugger the only listeners I see are on the document. And the input element above does not show any event listener, just a ‘react_id” or sth.
uh, well you can render server-side... i've heard of some react/reagent users doing that - i've no idea if it's very common to do it though
but i'm seeing handlers on elements in my app - https://www.evernote.com/l/AD4rNLlwU7RPy4ukE-8thUq3AFexk3fi9b0
although the http://sentry.io client, raven.js, is rather obscuring their origin
OK, I’ll keep digging. Thx for the datapoints.
Looks like little if any advantage to building page initially by dumping a big string of HTML into innerHTML. That makes things easier.
@hiskennyness Yes, it is React that puts all listeners on the highest DOM level, not the lower levels in the DOM.