Hacker News new | past | comments | ask | show | jobs | submit login

Think you're gonna have a bad time. Should be something like:

function handleChange(e){

  getAutoSuggestions()

  setLoadingState(true)
}

^ Side effects happen in response to user input

function getAutoSuggestionsCallback(resp){

  setSuggestions(resp)

  setLoadingState(false)
}

^ No side effects




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: