fahad19 / proppy

Functional props composition for UI components (React.js & Vue.js)
https://proppyjs.com
MIT License
939 stars 27 forks source link

Return an async iterable #45

Open fabiancook opened 4 years ago

fabiancook commented 4 years ago

This would give a "native" way to consume changes.

A possible example of usage...

import { withProps } from 'proppy';

const P = withProps({ counter: 1 });

const p = P();

for await (const value of p.subscribe()) {
  console.log({ value });
}
fahad19 commented 4 years ago

Hi @fabiancook!

This looks interesting. Do you have any PoC for this? I can investigate if it's worth exploring it then.