Fork me on GitHub
#reagent
<
2016-04-28
>
escherize00:04:09

:dangerouslySetInnerHTML is what I used on http://hiccup.space

tom03:04:02

For excluding react from reagent I am getting ERROR - required "cljsjs.react" namespace never provided even though I added the echo "(ns cljsjs.react)" > src/cljsjs/react.cljs

tom03:04:00

Moved to src/cljs/cljsjs/react.cljs but react is still included

pepe07:04:08

@escherize: I missed this hiccup tool, and I like a lot. Thank you for sharing šŸ˜‰.

escherize08:04:19

Sure thing - it's successor is http://cljsfiddle.com

hjrnunes09:04:50

cheers guys

hjrnunes09:04:46

I got it working

hjrnunes09:04:56

correct me if Iā€™m wrong though, but ideally what weā€™d want was md->hiccup right?

mikethompson10:04:16

@bostonaholic: This will help a bit ... already has externs etc for Chart.js here http://cljsjs.github.io/

kauko11:04:39

Hey! I was about to start a small demo project using Reagent+Posh, but then I started thinking: what exactly is the difference between that setup and just using Om Next? I feel like if I wire Reagent+DataScript together, am I not just recreating Om Next?

kauko11:04:11

I'm mainly concerned that I'll just end up running into problems that Om Next has already solved

kauko11:04:27

also, I know I can use DataScript with Om Next too. When I'm talking about "Reagent+Posh vs Om Next", I'm mainly comparing the idea of using colocated data queries in components

yogthos12:04:09

@hjrnunes json-html already supports cljs and has json->hiccup for working with Reagent

hjrnunes12:04:38

@yogthos: yep, I use it already. Thanks btw! So, I was thinking of something like that but for markdown. I glanced over markdown-clj source but couldnā€™t immediately figure out a good way of doing that. I suppose MD would have to be parsed into some data structure intermediate representation and then from that to HTML.

yogthos12:04:04

ah yeah markdown-clj doesnā€™t use an intermediate structure unfortunately

escherize12:04:14

json->hiccup is one of the best re-frame app-db / ratom visualization strats, btw

hjrnunes12:04:36

@escherize: true, I use it to debug my app state mostly

escherize12:04:50

yes 3 cheers for @yogthos šŸ˜„

escherize12:04:24

@hjrnunes: not a great solution but you can use one of the javascript markdown libraries for that

hjrnunes12:04:18

I went with markdown-clj and dangerouslySetInnerHTML

escherize12:04:30

That's probably what I would do too

escherize12:04:57

I've never had dangerouslySetInnerHTML break my app afaik

hjrnunes12:04:23

yeah, Iā€™m using it in a personal app anyway

hjrnunes12:04:53

so no one is going to inject malicious html but me ahah

escherize12:04:23

formidable opponent XD

hjrnunes12:04:07

sometimes the worse of them all...

jeremyraines20:04:10

I am having trouble getting reagent to respect an {ā€¦ :enctype ā€œmultipart/form-dataā€} attribute on a form

gadfly36120:04:17

@jeremyraines: try :enc-type instead, that worked for me

gadfly36120:04:21

This may be useful: https://facebook.github.io/react/docs/tags-and-attributes.html#html-attributes where stuff like encType --> enc-type in reagent

tom22:04:29

I'm using create-class and reactify-component successfully to take props from a native react implementation. However, I'd like to use this component in multiple places and tracking different states--can this be done?

tom23:04:21

If there isn't a built in process for multiple uses of a component, should I start generating unique IDs or is there some other way expose the reactified component?