frintjs / frint-props

Compose reactive props in FrintJS applications
https://frint.js.org
MIT License
12 stars 1 forks source link

frint-props: create `shouldUpdate` #10

Closed fahad19 closed 6 years ago

fahad19 commented 6 years ago

This function should decide whether to stream further or not.

Expected API usage

shouldUpdate((prevProps, nextProps) => true);

Based on the Boolean return value from the provided function, the Observable will decide whether to emit new values or not.

Tip

distinctUntinChanged operator in RxJS will come handy.

See existing implementation of map function for inspiration.