proyecto26 / ion-phaser

A web component to use Phaser Framework with Angular, React, Vue, etc 🎮
https://market.ionicframework.com/plugins/ionphaser
MIT License
251 stars 39 forks source link

Property 'ion-phaser' does not exist on type 'JSX.IntrinsicElements' #35

Closed AsadDUET closed 3 years ago

AsadDUET commented 3 years ago

This code gives error in .tsx file. what is wrong??

`import React from 'react' import ReactDOM from 'react-dom' import { defineCustomElements as defineIonPhaser } from '@ion-phaser/core/loader' import Phaser from 'phaser'

const game = { width: "100%", height: "100%", type: Phaser.AUTO, scene: {} }

ReactDOM.render(<ion-phaser ref={el => el.game = game} />, document.getElementById('root'));

defineIonPhaser(window);`

Error: Property 'ion-phaser' does not exist on type 'JSX.IntrinsicElements'

jdnichollsc commented 3 years ago

Can you try using this component into another component please?

jdnichollsc commented 3 years ago

Nevermid, please use the package for react https://www.npmjs.com/package/@ion-phaser/react