panzerdp / dmitripavlutin.com-comments

7 stars 0 forks source link

react-comments/ #166

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

How to Write Comments in React: The Good, the Bad and the Ugly

{/ Comment /} is the usual way to write comments in React. But there are 2 better ways to comment you just have to know.

https://dmitripavlutin.com/react-comments/

idiglove commented 1 year ago

Thank you for this post! Didn't realize til now that there was the 3rd option! Awesome :)

panzerdp commented 1 year ago

Thank you for this post! Didn't realize til now that there was the 3rd option! Awesome :)

@idiglove You're welcome! Yes, the 3rd option is awesome.

WhiskeyRomeoLima commented 1 year ago

I also did not know about the third way. So many times I resorted the to ugly way. Now never again.

panzerdp commented 1 year ago

I also did not know about the third way. So many times I resorted the to ugly way. Now never again.

@WhiskeyRomeoLima Glad you like it!

kibrukuture commented 1 year ago

A comment inside a tag is the coolest IMO.

panzerdp commented 1 year ago

A comment inside a tag is the coolest IMO.

@kibrukuture Agreed. This is my favorite too.

asztal commented 1 year ago
<div>
  {void "There is another way"}
</div>
panzerdp commented 1 year ago

@asztal Very original. I like it.