thanks @p-himik, I did as suggested + switch to material ui, it works but style seems not to work properly,
(defn row [index style]
(r/as-element
[:> ListItem {:button true
:style style
:key index}
[:> ListItemText {:primary "test"}]]))
(defn example []
[:> FixedSizeList {:height 500
:item-count 200
:item-size 200
:width 300
:border "1px solid black"}
row])
(defn iam-app []
[:<>
[:div [example]]])
The example I followed was https://codesandbox.io/s/6zvhc?file=/demo.js , not sure how can I pass in data to row if replacing [row] with row? and how do we do this in cljs/hiccup? Thanks
renderRow.propTypes = {
index: PropTypes.number.isRequired,
style: PropTypes.object.isRequired,
};
all good, I need to destructure the params passed to row properly, thanks
Whats the Clojurescript equivalence of Javascript re.exec
?
re-maches
returns the string and captured group without name.
Is there a way to get the captured group name and its value ?
For example for regex "^/item/(?<itemid>[a-zA-Z0-9-]+?)$"
I want to get the {:itemid 1}
for string /item/1
.
It's not a malformed array. In JavaScript world, it's a proper array-like object with custom fields. Or something like that.
Do not convert it to CLJS using js->clj
. Just use interop: (.-matches result)
.
The matches themselves can be converted with js->clj
if you really need it.
It worked. Thanks buddy
Nothing built-in. You can just JS interop or some thirdparty library.
Whatās the best non-chrome browser for cljs development these days?
Yeah, I was really excited about it, too. Was hoping to be mentored and help with the feature.
Would Safari be a huge step down for cljs dev? Iād like to commit to Safari or FF for an upcoming large project. Donāt want to re-learn tools in the middle of something bigā¦.
Seems Safari would be optimized for my mbp, which could be a good thing. And itās WebKit.
I don't remember seeing anything good about WebKit that wouldn't also be true for Chrome/FF. But I remember quite a few instances were it didn't work as expected. Also not sure what "optimized" would mean here. If it work fast enough both for you and your users, then all is good.
I just hate Google and Chrome now. Itās totally irrational, but there it is.
I just want to support the alternatives.
āoptimizedā = runs better on the mac Iām developing on
Given that most browsers are based on Chromium and generally provide only user-facing changes, I'm pretty sure that your only alternative is Firefox.
But its DevTools are not yet as extendable as Chrome's AFAIK.
Yeah, FF was on the verge of implementing the custom formatters, but it got squashed after downsizing š
Oh, that sucks, I didn't know about that.
#shadow-cljs Iām importing a library via :require . Then after doing the shadow-cljs release to a node-library I get this error when importing it into the browser. Does anyone know why it doesnt resolve the require durin the build?
because as the name implies it is building a node-library
. intended to run in node, not in the browser?