Closed avioli closed 3 weeks ago
Reason it was removed was due to the fact anonymous functions do not have a stable hash code (as intended) and would create an exponential number of callbacks on rebuilds.
You can use listen on a signal or create an effect directly in the constructor or on init.
The change-log states that from version
5.0.0
the utility functioncreateEffect
was added:https://github.com/rodydavis/signals.dart/blob/1fee8793968d4971c7a8e733ed9f29e23a812515/packages/signals_flutter/CHANGELOG.md?plain=1#L42
I don't seem to be able to find it in any version, though.
Only place I did was in the repo's changes from previous version to 5.0.0 to now: https://github.com/rodydavis/signals.dart/blob/456466c7f0f25c360245ec155f4ea16b0f941175/packages/signals_flutter/lib/src/signals/core/effect.dart