(no title)
cetra3
|
3 years ago
The example you highlighted as "doing it wrong" is pretty typical for an autosuggest component: Input updates trigger some request, which propagates to some list somewhere else in the dom. As it's loading, a spinner is shown, but when results are retrieved, they're updated again. Throw in apollo to the mix or some other request library, and context is used.
treis|3 years ago
function handleChange(e){
}^ Side effects happen in response to user input
function getAutoSuggestionsCallback(resp){
}^ No side effects