ion-phaser icon indicating copy to clipboard operation
ion-phaser copied to clipboard

Support React v17

Open i3z0x1 opened this issue 3 years ago • 3 comments

We have to upgrade this package support React latest version v17.0.2.

As I have an error installing this dependencies using NPM. Fix the upstream dependency conflict

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.7.0" from @ion-phaser/[email protected]
npm ERR! node_modules/@ion-phaser/react
npm ERR!   @ion-phaser/react@"*" from the root project
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.```

i3z0x1 avatar Mar 01 '22 04:03 i3z0x1

Another Error while try get component <IonPhaser ref={gameRef} game={game} initialize={initialize} />

ExceptionsManager.js:149 Invariant Violation: View config getter callback for component `ion-phaser` must be a function (received `undefined`). Make sure to start component names with a capital letter.

i3z0x1 avatar Mar 01 '22 05:03 i3z0x1

Hello mate, thanks for reporting this issue!

Very odd, let me check! in the meantime, you can try using a hook approach instead: https://stackblitz.com/edit/react-phaser

Best Regards, Juan

jdnichollsc avatar Mar 01 '22 17:03 jdnichollsc

Same happens to me, using [email protected]

rsodre avatar Aug 09 '22 17:08 rsodre