|
|
|
|
|
by anaisbetts
282 days ago
|
|
Of course, the goal of the example is to teach using an example that makes sense logically. Templates can be arbitrarily large and obviously as the template gets bigger, the difference between it and manual `document.createElement` calls gets much larger. |
|
I thought it was an optimization, but benchmarking `document.createElement` was significantly faster (firefox).
And then having `template` in your html means that changes to the template/use are less local.
I feel like this is an improvement that only makes sense if you're neck deep in the react world.