2 ms·
Can React use separate HTML templates? I find this style of mixing markup and Javascript super-ugly.
by Grue3 11y ago
Can React use separate HTML templates? I find this style of mixing markup and Javascript super-ugly.
- jon-wood 11y agoDone right you don't really do a lot of mixing markup and Javascript - you'll have a render method which takes your components current state and turns it into markup, with everything else being straight Javascript. There are ways to avoid it, but I'd encourage you to give it a while before looking for a way out, because almost everyone I know who had that initial reaction has come round to it.
- wangii 11y agoI had exactly same feeling when I first saw it in 1 min: it's ugly and why the hell folks get excited by integrating template into javascript? Please keep reading! It's really more than that! I wasted 2 years by not spending 20 more mins.