Closed philoskim closed 1 year ago
Problem is: reagent interop inside of efor — (e/for [index (range 3)] (with-reagent TinyLineChart ...))
— apparently only renders once
@philoskim try wrapping each with-reagent
call into it's own div container. The with-reagent code writes directly into the current element in scope.
Ooh, it seems that the with-reagent
macro actually includes a wrapper div, so I am wrong
I encountered a problem on reagent-interop in Electric.
The following is the code I tweaked the existing code in Electric to show the problem.
The resultant screenshot is here.
The above code is simplified and contrived in some way but what I want here is to enumerate reagent-interopped components three times.
However, the first and second reagent-interoped components are not shown and the last indexed components are only shown.
The whole code to run locally is here.
https://github.com/philoskim/electric/blob/master/src-docs/user/demo_reagent_interop.cljc
Don't forget to execute
npm install
before running the example.