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

Commit ac378ac

Browse files
authored
Fix initial example.
1 parent da96209 commit ac378ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Web components are converted to React components simply by passing them to the m
1515
import reactify from 'skatejs-react-integration';
1616

1717
// Create your constructor.
18-
const MyComponent = class MyComponent extends HTMLElement {};
18+
class MyComponent extends HTMLElement {};
1919

2020
// Define your custom element.
21-
const CustomElement = window.customElements.define('my-component', MyComponent);
21+
window.customElements.define('my-component', MyComponent);
2222

2323
// Reactify it!
24-
export default reactify(CustomElement);
24+
export default reactify(MyComponent);
2525
```
2626

2727
Usage with [SkateJS](https://github.com/skatejs/skatejs) is pretty much the same, Skate just makes defining your custom element easier:

0 commit comments

Comments
 (0)