This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-25
Channels
- # admin-announcements (5)
- # arachne (1)
- # beginners (29)
- # boot (36)
- # cider (110)
- # clara (1)
- # cljs-dev (3)
- # cljs-edn (14)
- # cljsrn (24)
- # clojure (63)
- # clojure-belgium (3)
- # clojure-dusseldorf (5)
- # clojure-greece (9)
- # clojure-russia (142)
- # clojure-sg (15)
- # clojure-uk (20)
- # clojurebridge (4)
- # clojurescript (58)
- # data-science (1)
- # datomic (37)
- # editors (2)
- # editors-rus (7)
- # emacs (1)
- # garden (31)
- # hoplon (3)
- # jobs-discuss (8)
- # keechma (86)
- # leiningen (1)
- # liberator (2)
- # mount (23)
- # off-topic (2)
- # om (18)
- # onyx (42)
- # planck (1)
- # quil (6)
- # re-frame (8)
- # reagent (3)
- # ring-swagger (1)
- # specter (4)
- # untangled (1)
I used the #js reader macro wrong, assuming it would use the keyword names as keys the way clj->js
does
when react has .bind(this)
in an event handler on a component in JSX, what does this
refer to? I'm trying to replicate this using this-as
, but I'm not sure how
for example:
import {GoogleSignin, GoogleSigninButton} from 'react-native-google-signin';
render() {
<GoogleSigninButton
style={{width: 48, height: 48}}
size={GoogleSigninButton.Size.Icon}
color={GoogleSigninButton.Color.Dark}
onPress={this._signIn.bind(this)}/>
}
The components often have ”methods” that they call like that. Generally that object oriented way of doing things work less well to integrate into cljs. I am not sure but I think this
would refer to the react object of the class?
Nope, I’m working with reagent which has its own adapt-react-class
so generally I don’t meddle too much in JS-land.
But wouldn’t (._signIn google-sign-in-button)
work? Is the method just a pure function or is it mutating the object?
You’ll probably be best of reading the source code of GoogleSigninButton and try to figure out how things work from there...
I put the JSX into babel repl and got this:
React.createElement(GoogleSigninButton, {
style: { width: 48, height: 48 },
size: GoogleSigninButton.Size.Icon,
color: GoogleSigninButton.Color.Dark,
onPress: undefined._signIn.bind(undefined) });
so I think in their example, they get the signin function from the component and attach it to the parent component class
Can anybody send me some pointers as to how to use a TextEdit component with re-natal. I cant figure out how to capture the value in a text field when a submit button is pressed
I have been working on trying to get NavigationExperimental to work with re-frame (Oh yes they played along very nicely) and if someone wants to have a look I posted the result here: https://github.com/vikeri/re-navigate