search
prop.selection
prop.search
prop is used as the source for two separate streams.search
prop changes, if its value is truthy, it is debounced and sent through a pipeline which includes an asynchronous fetch request, and some data manipulation.search
prop changes, if its value is an empty string, it is mapped to another setState
effect which resets the suggestions
state to an empty array.selection
prop changes, it is sent through a similar logic pipeline to the first stream, which results in the user
state being updated.aperture
.toState
"effectCreator" function at the end - this is a helper function similar to a redux actionCreator
.SET_STATE
, the handler
passes the effect's payload into initialProps.setState
.