Right now use_effect(..., dependencies=None) triggers AND cleans up on every render. But there are circumstances where I need some conditions checked (such as within ReactPy Django's django_css component) on every render, and then need a specific action taken only when a true component dismount takes place.
Proposed Actions
Create a variant of use_effect(..., dependencies=None) that can only clean up on the final render.
We might want to use this as a pivot point to change the way we currently declare "manual effect conditions". The API is currently not very intuitive.
Perhaps we have some kind of object that signifies all the available manual effect conditions?
Current Situation
Right now
use_effect(..., dependencies=None)
triggers AND cleans up on every render. But there are circumstances where I need some conditions checked (such as within ReactPy Django'sdjango_css
component) on every render, and then need a specific action taken only when a true component dismount takes place.Proposed Actions
Create a variant of
use_effect(..., dependencies=None)
that can only clean up on the final render.We might want to use this as a pivot point to change the way we currently declare "manual effect conditions". The API is currently not very intuitive.
Perhaps we have some kind of object that signifies all the available manual effect conditions?