Fork me on GitHub
#fulcro
<
2020-03-18
>
roklenarcic16:03:44

I have a dimmer that covers the whole app. I’d like to run the transaction to activate or deactivate it without rerendering all of my components… is that possible?

roklenarcic16:03:31

Going (`transact! this` will rerender the current component if I understand this correctly.

tony.kay19:03:35

@roklenarcic depends on which renderer you pick. keyframe-render2 has an only-refresh option, that will let you target components by ident

roklenarcic19:03:18

should I bother with ident optimized rendered if UI isn’t large?

currentoor19:03:36

short answer no

currentoor19:03:04

keyframe-render2 will probably be better in 99% of apps

👍 4
currentoor19:03:31

IMO ident optimized render is a pre-optimization

currentoor19:03:25

it’s the older way of doing things and try to always be fast at the expense of requiring follow-on reads which can cause tons of confusion

currentoor19:03:08

keyframe-render2 will work as you expect and you can optimize specific portions of the app as you see fit when you need to

currentoor19:03:17

if you even need to

currentoor19:03:02

i’d probably even use keyframe-render2 for large UIs and just optimize the hotspots

currentoor19:03:06

but it’s situational

roklenarcic21:03:32

ok thx for the help

tony.kay20:03:05

@roklenarcic one other thing: you might consider setting :shouldComponentUpdate to true on components near the root. The cost of props comparisons can easily outweigh the React diff, and the checks at the top basically just waste CPU in order to say “yes”

roklenarcic21:03:30

on unrelated note, I’ve been using the fulcro semantic-ui library. I haven’t been able to use the as attribute correctly. Using :as "Segment" produces the confusing error Warning: The tag <Segment> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.

tony.kay22:03:05

why would you ever do as with a string?

tony.kay22:03:16

the latest version puts one component per ns, so you can pull in just the ones you want, which should minimize build size in cljs