I hereby claim:
- I am acburdine on github.
- I am acburdine (https://keybase.io/acburdine) on keybase.
- I have a public key ASC1eFR6Lslrw67L_rIp3mkflwflYD0rgB4rK_amb9jVnQo
To claim this, I am signing this object:
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
import Ember from 'ember'; | |
const {computed} = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
sortdef: ['id'], | |
sortedModel: computed.sort('model', 'sortdef'), | |
addons: | |
apt: | |
sources: | |
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main' | |
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg' | |
packages: | |
- yarn | |
install: | |
- yarn |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Upgrade things initially | |
apt update && apt upgrade -y | |
# Add Yarn repo | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
# Install NodeJS 8 package repo (runs apt update in the script which is why we add yarn first) |
I was building a component that did address autocompletion against a GraphQL endpoint using react-apollo
.
The value of the input field was used to search for addresses, but I didn't want every single keystroke to result
in a new GraphQL query. So, I needed some sort of debounce function (Apollo doesn't provide this natively).
While I could have used a class component for something like this, I wanted to see if it could be done more simply with Hooks. This is what I came up with.
in one terminal window, run node parent.js
in another, run tail -f test.log
with the cp.stderr.destroy line commented out, the node parent.js
process will not automatically exit. With the cp.stderr.destroy line uncommented, the parent process correctly exits and the child process is unaffected.