Skip to content

Support Preact X #6

Description

@lydell
  • 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:

    // 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",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions