|
|
|
|
|
by cetra3
1204 days 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. |
|
function handleChange(e){
}^ Side effects happen in response to user input
function getAutoSuggestionsCallback(resp){
}^ No side effects