realar-project / realar

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

low: try deprecate stopppable #70

Closed betula closed 3 years ago

betula commented 3 years ago

selector(init_value?, (stop) => {});
selector((stop?) => {});

cycle((stop) => {});
on((stop) => {}, () => {});

// But I think pool no need to use "(stop) =>" syntax, maybe stoppable() is better for pool?
// pool.stop

pool(async () => {
  const stop = pool.stop;
  pool.stop();
  pool.stop.throw();
});

pool.stoppable((stop) => {
  return async () => {

  }
});
betula commented 3 years ago

Added to "the stream of conciseness 0.7+ roadmap"