Fork me on GitHub
#re-frame
<
2018-09-16
>
ognivo18:09:12

Hello Re-framers! I look for a debugging advice. Have a properly working re-frame sub – shows the correct values in re-frisk tooling, but doesn’t render to UI. However, when I update the code a bit – then after the hot swap the desired re-render occurs. Sounds familiar?

manutter5118:09:18

It’s possibly an issue with the underlying React framework not noticing your changes. One way to force React to notice is to explicitly set a key on the component with the changeable data as part of the key

manutter5118:09:18

It’s possibly an issue with the underlying React framework not noticing your changes. One way to force React to notice is to explicitly set a key on the component with the changeable data as part of the key

manutter5118:09:30

^{:key (str "my-component-" changeable-val)} [my-component ...]

ognivo19:09:24

Worked! Thanks! Can I make it more elegant now?