searchprop is used as the source for two separate streams.
searchprop changes, if its value is truthy, it is debounced and sent through a pipeline which includes an asynchronous fetch request, and some data manipulation.
searchprop changes, if its value is an empty string, it is mapped to another
setStateeffect which resets the
suggestionsstate to an empty array.
selectionprop changes, it is sent through a similar logic pipeline to the first stream, which results in the
userstate being updated.
toState"effectCreator" function at the end - this is a helper function similar to a redux
handlerpasses the effect's payload into