bberak / react-game-engine

A lightweight Game Engine for the web (React) ๐Ÿ•นโšก๐ŸŽฎ
MIT License
420 stars 25 forks source link

Fix react warnings (UNSAFE_ and string ref) #16

Closed koenigstag closed 2 years ago

koenigstag commented 2 years ago

Tested game engine today for the first time and found some react warnings. Fixed: 1) Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. 2) A string ref, "container", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead.

bberak commented 2 years ago

Thanks @koenigstag - this looks great ๐Ÿ™. I'll merge this into master and publish to npm after work ๐Ÿ‘

bberak commented 2 years ago

Hey @koenigstag - I've just published v1.1.0 containing your pull request + some additional fixes.

Thanks for your contribution ๐Ÿ™