News for hackers. Stuff that matters.
Re:Comments in React: The Good, the Bad and the Ugly by hussainbilal on Sunday April 30, 2023 @06:55PM (#35767323)
Or... You could define a comment component that either,

1. Always takes props but always returns null. (Useful for Todo comments that contain jsx code snippets that don't render)

2. Or, always takes children and a single comment prop, and always returns children in react fragment. (To associate specific comments with specific jsx snippets)

You could even have multiple exports for them. (I.e. Todo vs Warning vs. Comment)