Always re-rendering? #240
-
After installing
Does using twrnc cause all components to always re-render unless the style is wrapped up in a memo? Or am I missing something? Changing to this:
eliminates extra renders, but seems like a lot of extra overhead |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
good question. i've not had any perf issues from this myself, but it didn't seem right that two identical calls to here's the PR if you're interested: i've already merged it and cut a new release: |
Beta Was this translation helpful? Give feedback.
-
Awesome! I'll get it updated in my proj and try it out |
Beta Was this translation helpful? Give feedback.
good question. i've not had any perf issues from this myself, but it didn't seem right that two identical calls to
tw
would not be===
so i poked around a bit and found i was spreading in one spot where i didn't need to, thus creating a new object which would trigger a rerender.here's the PR if you're interested:
#241
i've already merged it and cut a new release:
3.6.4
. would you mind testing it to see if it seems better? there are still cases where you'll fail the===
test, specifically if you're also passing in a style object to be merged, but that is far rarer than just passing a string of utilities.