developit / developit/preact-shadow-root

Support Preact X

オープン
#6 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
73
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

説明

- `this.base` is `undefined` at `componentDidMount`, so `this.shadow` never gets initialized.
- `props.children[0]` is `undefined`, since `children` isn’t always an array anymore.
- The third argument to `render()` should be removed, as per the Preact X upgrade docs.

I run the following replacements on my bundle as a workaround:

```js
// Hacks to make `preact-shadow-root` work with Preact 10.
"this.base&&this.base.parentNode": "this.__P",
"o.children[0],": "o.children,",
"this.shadow.firstChild": "undefined",
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。