|
|
|
|
|
by hombre_fatal
761 days ago
|
|
Fwiw, you can use JSX without React. Another project on the HN homepage at the moment happens to do this: https://www.val.town/v/maxm/staticChess const { renderToString } = require('react-dom/server')
renderToString(<ul>{[1, 2, 3].map(n => <li>{n}</ul>)}</div>)
Granted, you have to configure it so that JSX is allowed in your JS. For example, by running your code as `tsx server.js`, but I find it so much better than Pug/Nunjucks of yore that it makes up for that downside. |
|