Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
solardev
on Sept 8, 2022
|
parent
|
context
|
favorite
| on:
The self-fulfilling prophecy of React
{/* I would be so happy to never have to do this again */}
stickfigure
on Sept 9, 2022
[–]
Doesn't every editor have a "comment" hotkey? I can't remember the last time I typed block comment characters in
any
language. cmd-/ in IntelliJ.
solardev
on Sept 9, 2022
|
parent
|
next
[–]
I don't want to make the whole line a comment. I just wanna add a comment where the language don't want me to.
stickfigure
on Sept 9, 2022
|
root
|
parent
|
next
[–]
Select the fragment you want to comment out, then hit cmd-/. It doesn't have to be a whole line.
nicoburns
on Sept 9, 2022
|
parent
|
prev
[–]
Mine doesn’t work very well in JSX blocks. Partly because I don’t think there is any way to insert a comment inside a JSX tag (to comment out an attribute).
ncphillips
on Sept 9, 2022
|
root
|
parent
[–]
It is possible:
<Button
// id=“commented-out” onClick={doSomething}
/>
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: