realar-project / realar

5 kB Advanced state manager for React
MIT License
45 stars 0 forks source link

low: replace effect method to some unsubscriber registrator #49

Closed betula closed 3 years ago

betula commented 3 years ago
effect(() => () => ( // Ugly (((
  this.items_destroy && this.items_destroy()
));

// Must be pretty

unsub(() => {
  this.items_destroy && this.items_destroy()
});

// ... Think about

// Or perfect one!

un(() => {
  this.items_destroy && this.items_destroy()
});
betula commented 3 years ago

https://github.com/betula/realar/commit/e8b5e382e59ea56d0db0f04ac6ae92a1c09b31a3#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R498 - un function added

betula commented 3 years ago

Implemented in 0.6.0