Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Commit 144b8e5

Browse files
committed
Update to newer ES6 module draft
Fixed #5
1 parent 372a2be commit 144b8e5

5 files changed

+5
-5
lines changed

Diff for: 01 - Core/01 - Classes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Instead of using @jsx directive we import the HTML export from react-dom
22
// and bind it to the JSX identifier. This models the DOM dependency explicitly.
33
// The JSX transpiler uses this identifier to resolve HTML tags. E.g. JSX.div();
4-
import { HTML: JSX } from "react-dom";
4+
import { HTML as JSX } from "react-dom";
55

66
// The only reason we need a React depencency here is because the base class
77
// provides the this.setState method.

Diff for: 01 - Core/02 - Mixins.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from "react";
2-
import { HTML: JSX } from "react-dom";
2+
import { HTML as JSX } from "react-dom";
33
import { mixin } from "react-utils";
44

55
// Chainable mixins

Diff for: 01 - Core/03 - Stateless Functions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Instead of using @jsx directive we import the HTML export from react-dom
22
// and bind it to the JSX identifier.
3-
import { HTML: JSX } from "react-dom";
3+
import { HTML as JSX } from "react-dom";
44

55
// A simple component, that isn't stateful, can be provided as a single
66
// function that accepts props. This provides React with a hint that this

Diff for: 01 - Core/04 - Modules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Button } from "Button";
99

1010
// and can be aliases like this:
1111

12-
import { Button: MySpecialButton } from "Button";
12+
import { Button as MySpecialButton } from "Button";
1313

1414
// Another alternative is to export defaults. It's unclear which of these two
1515
// paradigms will win for Component modules. If default exports win popular

Diff for: 01 - Core/08 - Transferring Props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { HTML: JSX } from "react-dom";
1+
import { HTML as JSX } from "react-dom";
22

33
// Draft
44

0 commit comments

Comments
 (0)