This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I have a n00b question: what determines whether a component is re-rendered when it uses a ratom that is updated? I’m working on a little “I want to learn how this works” project before I embark on a real side project and I’m probably missing something stupid.
My code looks sorta like this:
When I swap!
or reset!
db, first-component
re-renders, but second-component
doesn't
(I figured this out by putting a console.log in the inner function of each component)
Yeah. I'm fairly certain I'm missing something stupid. But I can't figure out what.
What does it take to get a form-2 component to re-render when a ratom changes value? Do I have to pass in the ratom as an argument? Or can I just dereference it within the function?