Skip to content

Commit ecfab0a

Browse files
authored
Merge branch 'master' into typings
2 parents 6d3bc8b + 8cdceba commit ecfab0a

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"eslint-config-developit": "^1.1.1",
7878
"jest": "^24.1.0",
7979
"microbundle": "^0.10.1",
80-
"preact": "^8.4.2",
80+
"preact": "^10.0.0",
8181
"react": "^16.8.3"
8282
}
8383
}

src/integrations/preact/index.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@
1111
* limitations under the License.
1212
*/
1313

14-
import { h, Component, render as preactRender } from 'preact';
14+
import { h, Component, render } from 'preact';
1515
import htm from 'htm';
1616

17-
function render(tree, parent) {
18-
preactRender(tree, parent, parent.firstElementChild);
19-
}
20-
2117
const html = htm.bind(h);
2218

2319
export { h, html, render, Component };

test/preact.test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('htm/preact', () => {
8383
scratch.innerHTML = '';
8484

8585
render(html`<div is-before="blah" ...${props} />`, scratch);
86-
expect(scratch.innerHTML).toBe(`<div is-before="blah" a="1" b="2" c="3"></div>`);
86+
expect(scratch.innerHTML).toBe(`<div a="1" b="2" c="3" is-before="blah"></div>`);
8787
scratch.innerHTML = '';
8888

8989
render(html`<div ...${props} is-after />`, scratch);
@@ -92,7 +92,7 @@ describe('htm/preact', () => {
9292
scratch.innerHTML = '';
9393

9494
render(html`<div is-before ...${props} is-after="blah" />`, scratch);
95-
expect(scratch.innerHTML).toBe(`<div is-before="true" a="1" b="2" c="3" is-after="blah"></div>`);
95+
expect(scratch.innerHTML).toBe(`<div a="1" b="2" c="3" is-after="blah" is-before="true"></div>`);
9696
scratch.innerHTML = '';
9797

9898
render(html`<div ...${props} ...${other} />`, scratch);

0 commit comments

Comments
 (0)