Skip to content

Stage types are lost when using TypeScript and Dynamic Import in Next.js. #278

@eai04191

Description

@eai04191

First of all, thank you for maintaining this amazing library!

Description

No problem when importing as usual.

image

In Next.js, needs to use Dynamic Import to prevent SSR.
Doing so will result in a Stage type loss and a type error.

image

Steps to reproduce

See in codesandbox.
https://codesandbox.io/s/sharp-snow-u2xev?file=/pages/index.tsx

  1. Install dependencies.
  2. Dynamic import Stage from @inlet/react-pixi.
  3. Add attributes to Stage.

Additional info

  • @inlet/react-pixi version: 6.0.9
  • React version: 17.0.1
  • ReactDOM version: 17.0.1
  • PIXI version: 5.3.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions