Fork me on GitHub
#cljsrn
<
2017-06-20
>
kurt-o-sys10:06:24

quick one: is there an example somewhere of how to add fonts in cljsrn?

viveke12:06:11

Hi Everyone, I would like to customise list view row item design. Please find the code below. Please let know know where i need to add style to separate list items

viveke12:06:24

[list-view {:dataSource state :render-row #(r/as-element [text %]) :style {:background-color :red :margin 10 :padding 10}}]

ronb12:06:12

@kurt-o-sys check how react-native-vector-icons adds fonts. You have to add them to your native projects. AFAIK exp uses a different approach, where you can load them with a require(), but you probably then need exp as a dependency

ronb12:06:08

@viveke there should be a method called :render-list-separator to render separators. if you want to style rows differently, you can only do that based on the dataSource row data

ronb12:06:37

also there is a new FlatList and SectionList which improved rendering performance quite a bit for me. they don’t require you to use a dataSource

viveke12:06:00

It was my requirement 👍 @ronb

kurt-o-sys13:06:15

@ronb thx, will check.