Mithril.js: Documentation has syntax error

Created on 30 Aug 2016  路  4Comments  路  Source: MithrilJS/mithril.js

Page http://mithril.js.org/mithril.html has syntax error:

Actual:

In Shorthand syntax:

var MyComponent = {
...
}

m.render(document.body, [
    //the two lines below are equivalent
    m(component, {data: "world"}),
    m.component(component, {data: "world"})
])


Expected:

var MyComponent = {
...
}

m.render(document.body, [
    //the two lines below are equivalent
    m(MyComponent, {data: "world"}),
    m.component(MyComponent, {data: "world"})
])
Documentation Bug

All 4 comments

Seems this have been fixed by the below commit

https://github.com/lhorie/mithril.js/commit/6ffeeaa19d5590d34082c24706a42e4167cb0a15

However, the site is still not updated. Perhaps, a rebuild required!?

@sanspace There's other similar issues that have also been caught, but not updated on the main site. IIRC @lhorie rebuilds the live site on each release (major/minor/patch), so it might be waiting for the next train (which is admittedly overdue IMHO).

So, we are waiting for a train and we do know where it would take us!! :laughing:

Fixed w/ 1.0 and new site

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhinesh03 picture dhinesh03  路  4Comments

StephanHoyer picture StephanHoyer  路  4Comments

andraaspar picture andraaspar  路  4Comments

volnei picture volnei  路  3Comments

tivac picture tivac  路  3Comments