Posts by Guilherme C. Dalleprane • 61 points
3 posts
-
0
votes1
answer68
viewsA: Keyboard shortcut system with special characters
Hello! You can take the keycode from the pressed key and convert to string as follows: String.fromCharCode(event.keyCode) To simplify, you could even validate by keycode of the special keys as for…
-
0
votes1
answer92
viewsA: Eslint problem in Reactjs with useEffect, in this case how do I not need to put the // Eslint-disable-line
The purpose of the rule exhaustive-deps linter, is to prevent Hooks from reading obsolete component properties or states. As much as other dependencies don’t change during rendering, linter doesn’t…
-
6
votes3
answers387
viewsA: Is there more than one way to use "if"?
Yes. In Javascript, when you don’t put keys, only the next instruction is executed. Keys are only needed when you want to execute more than one if-conditioned instruction. The instruction: let a = 1…