Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to improve some knockout code I have with JSX, defining the template inline with JSX.
I would like to output HTML comment, as in:
JavaScript
<tr data-bind="foreach: columns">
<th data-bind="css: { hidden: !visible() }">
	<!-- ko if: header -->
	<span data-bind="text: header"></span>
	<!-- /ko -->
</th>
</tr>

This won't pass JSX compilation, I am trying to replace the comments with a react class <KOComment text="if: header">somethings</KOComment>
where KOComment with output the knockout comment directive.

Any clue how to create a comment HTML element with React?
Posted
Updated 9-Oct-15 23:41pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900