Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is released. - It's "npm" not "NPM". It doesn't stand for anything, and it never has - it was initially chosen simply because it was easy to type. It has a lot of unofficial backronyms with "Node Package Manager" being one of the most common ones, but it's never officially stood for anything as an acronym *or* initialism. - Fixed a few errors in the change log, like non-breaking changes being included in the "Breaking Changes" section and an inaccuracy in the summary of a particular change. - Fixed RawGit URLs to point to GitHack, which is a lighter proxy that offloads caching to Cloudflare instead of also implementing it itself. (It also just uses nginx for all the important server logic, so it scales better.) - Add a few more v0.2 references as appropriate
This commit is contained in:
parent
8186818e10
commit
234b1c9302
26 changed files with 1389 additions and 935 deletions
|
|
@ -38,9 +38,9 @@ When using JSX, it's possible to interpolate JavaScript expressions within JSX t
|
|||
|
||||
```jsx
|
||||
var greeting = "Hello"
|
||||
var url = "http://google.com"
|
||||
var url = "https://google.com"
|
||||
var link = <a href={url}>{greeting}!</a>
|
||||
// yields <a href="http://google.com">Hello!</a>
|
||||
// yields <a href="https://google.com">Hello!</a>
|
||||
```
|
||||
|
||||
Components can be used by using a convention of uppercasing the first letter of the component name:
|
||||
|
|
@ -56,7 +56,7 @@ m.render(document.body, <MyComponent />)
|
|||
|
||||
The simplest way to use JSX is via a [Babel](https://babeljs.io/) plugin.
|
||||
|
||||
Babel requires NPM, which is automatically installed when you install [Node.js](https://nodejs.org/en/). Once NPM is installed, create a project folder and run this command:
|
||||
Babel requires npm, which is automatically installed when you install [Node.js](https://nodejs.org/en/). Once npm is installed, create a project folder and run this command:
|
||||
|
||||
```bash
|
||||
npm init -y
|
||||
|
|
@ -340,4 +340,4 @@ function SummaryView() {
|
|||
|
||||
In Mithril, well-formed HTML is generally valid JSX. Little more than just pasting raw HTML is required for things to just work. About the only things you'd normally have to do are change unquoted property values like `attr=value` to `attr="value"` and change void elements like `<input>` to `<input />`, this being due to JSX being based on XML and not HTML.
|
||||
|
||||
When using hyperscript, you often need to translate HTML to hyperscript syntax to use it. To help speed up this process along, you can use a [community-created HTML-to-Mithril-template converter](http://arthurclemens.github.io/mithril-template-converter/index.html) to do much of it for you.
|
||||
When using hyperscript, you often need to translate HTML to hyperscript syntax to use it. To help speed up this process along, you can use a [community-created HTML-to-Mithril-template converter](https://arthurclemens.github.io/mithril-template-converter/index.html) to do much of it for you.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue