What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-06 04:34:06
passing event handler to useEffeect
const App =() => { const [userText, setUserText] = useState(""); useEffect(() => { const handleUserKeyPress = event => { const { key, keyCode } = event; if (keyCode === 32 || (keyCode >= 65 && keyCode &l... Add solution -
Other 2021-10-06 03:47:04
Bigbinary gitignore
# Ignore bundler config. /.bundle # Ignore the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore database.yml file /config/database.yml # Ignore all logfiles and tempfiles. /log/*.log /tmp /db/backups public/uploads *.DS_Store cover... Add solution -
Javascript 2021-10-02 08:16:06
Node.JS gitignore
# Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented... Add solution -
Other 2021-09-30 02:12:03
Unexpected if as the only statement in an else block lint
/*eslint no-lonely-if: "error"*/ if (condition) { // ... } else if (anotherCondition) { // ... } if (condition) { // ... } else if (anotherCondition) { // ... } else { // ... } if (condition) { // ... } else { if (... Add solution -
Other 2021-09-28 08:30:03
eslint ignores
/* eslint-disable */ alert('foo'); /* eslint-enable */ Add solution