Does anyone here use roam? it’s written in cljs, and specifically supports adding your own js. I wonder if there’s a way to write extensions in cljs specifically
https://www.zsolt.blog/2021/02/a-closer-look-at-roamrender.html
Awesome. Thanks again. Seems my timing was pretty good
Why off topic?
How to write the following in cljs?:
new Date(23456789987)
I tried (Date. 23456789987) but I’m getting the error that “undefined is not a constructor. (evaluating new app.name.Date(23456789987))” How to fix this?
Put js/Date. Instead of the Date. You’re using
thanks @dpsutton
You can also use "new" in CLJS: (new js/Date 23456789987)
Hi! I am trying to use Native Base (React Native) in Clojurescript. Here is my code:
(n/ui-container {}
(n/ui-content {}
(n/ui-form {}
(n/ui-picker
{:note true
:mode "dropdown"
:style {:width 200}
:selectedValue "1"
:onValueChange (fn [x y] (log/debug x y ))}
(mapv (fn [item]
(let [i (str (.-id item))
n (str (.-name item))]
(n/ui-picker-item
{:label n
:value i
:key i}))) (into-array [#js{"id" "1" "name" "Foo"} #js{"id" "2" "name" "Bar"}])))
#_(when (seq categories)
(ui-category-list (comp/computed categories {:left-picked left-picked :pick-left pick-left})))
#_(when (seq items)
(ui-item-list (comp/computed items {:right-picked right-picked :pick-right pick-right}))))))
I get the following error message;
TypeError: undefined is not an object (evaluating 'child.props.value')
I appreciate any help. Thanks!Can't say anything definite without a stacktrace, but it seems like some component is expecting a child and isn't getting one.
Here is a shortened stacktrace:
TypeError: undefined is not an object (evaluating 'child.props.value')
This error is located at:
in PickerNB (at connectStyle.js:392)
in Styled(PickerNB) (created by yardwerk.mobile-ui.root/JobInput)
in RCTView (at View.js:34)
in View (at Form.js:10)
in Form (at connectStyle.js:392)
in Styled(Form) (created by yardwerk.mobile-ui.root/JobInput)
in RCTScrollContentView (at ScrollView.js:1124)
in RCTScrollView (at ScrollView.js:1260)
in ScrollView (at ScrollView.js:1286)
in ScrollView (at KeyboardAwareHOC.js:487)
in KeyboardAwareScrollView (at Content.js:37)
in RCTSafeAreaView (at SafeAreaView.js:51)
in ForwardRef(SafeAreaView) (at Content.js:36)
in Content (at connectStyle.js:392)
in Styled(Content) (created by yardwerk.mobile-ui.root/JobInput)
in RCTView (at View.js:34)
in View (at Container.js:12)
in Container (at connectStyle.js:392)
in Styled(Container) (created by yardwerk.mobile-ui.root/JobInput)
in yardwerk.mobile-ui.root/JobInput (created by yardwerk.mobile-ui.root/Root)
in yardwerk.mobile-ui.root/Root
in Unknown (created by ExpoRoot)
in ExpoRoot (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in DevAppContainer (at AppContainer.js:121)
in RCTView (at View.js:34)
in View (at AppContainer.js:132)
in AppContainer (at renderApplication.js:39)
I don't see any of the components above being mentioned in the trace, so there's still too little information for me to tell anything useful.
NBPicker
And where is NBPicker in your code snippet above? If you know, then you already know more than I do. :)
Ok. Thanks for your help @p-himik