reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
2020-03-28T02:44:15.014100Z

Hi, I was implement a workaround for Material-ui TextField described here: https://github.com/reagent-project/reagent/blob/master/examples/material-ui/src/example/core.cljs#L39, and I am curious why create-element + convert-props-value is used instead of adapt-react-class. I wrap it as

[:> TextField {...}]
and everything seems to work fine.

juhoteperi 2020-03-28T12:11:30.015700Z

@pavel.klavik Might have been because apply works nicely for handling variable number of children. :> and adapt-react-class also do automatic conversion of props from Cljs -> JS which often can work incorrectly, but doesn't seem to affect this as this calls the same convert function.

juhoteperi 2020-03-28T12:13:03.016500Z

I've added new example project for React Context and the docs now link to this: https://github.com/reagent-project/reagent/blob/master/examples/react-context/src/example/core.cljs this describes the difference for properties conversion

👍 1