Corrected the case issue of 'JavaScript' throughout the docs (#2401)

* corrected JavaScript spelling
This commit is contained in:
Ayush Jain 2019-04-01 17:44:38 +05:30 committed by Isiah Meadows
parent 44fac6c4ca
commit 982fdf5737
21 changed files with 72 additions and 72 deletions

View file

@ -67,6 +67,6 @@ m("ul",
)
```
However, Javascript arrays cannot be keyed or hold lifecycle methods. One option would be to create a wrapper element to host the key or lifecycle method, but sometimes it is not desirable to have an extra element (for example in complex table structures). In those cases, a fragment vnode can be used instead.
However, JavaScript arrays cannot be keyed or hold lifecycle methods. One option would be to create a wrapper element to host the key or lifecycle method, but sometimes it is not desirable to have an extra element (for example in complex table structures). In those cases, a fragment vnode can be used instead.
There are a few benefits that come from using `m.fragment` instead of handwriting a vnode object structure: m.fragment creates [monomorphic objects](vnodes.md#monomorphic-class), which have better performance characteristics than creating objects dynamically. In addition, using `m.fragment` makes your intentions clear to other developers, and it makes it less likely that you'll mistakenly set attributes on the vnode object itself rather than on its `attrs` map.