-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ratoms in children-as-function do not trigger re-renders #371
Comments
The problem here (as far as I understand and can describe) is that the function doesn't have Reactive context. There are several workarounds like:
Second one works because I think the fix for this would be to ensure the function uses the context of the main component.
|
Reagent components are rendered using That will call the render fn in
One solution could be to provide some utilities (and documentation) to guide users to use e.g. second workaround. |
See my notes over on react-context. Basically:
If
state
changes (via e.g.swap!
orreset!
), the component inside of the function passed intoother-component
will not re-render reactively.The text was updated successfully, but these errors were encountered: