/matching

The Super Mario Bros 3 card matching game, ported to ReactJS

Primary LanguageTypeScript

matching

The Super Mario Bros 3 card matching game, ported to ReactJS

Credits

Challenges

  • Modifying elements of an array during setTimeout() can be tricky because user actions could have modified elements of the same array in a different setTimeout() call.
    • Workaround: Move the element accesses to a useEffect() and have the setTimeout() modify a (potentially arbitrary) value that the useEffect() is watching.
  • Mobile CSS is chaotic and unpredictable

Deploy

rm -rf docs
npm run build
mv dist docs

Why React?

I needed to refresh my memory after having not used it for several years. It would have been better to use Canvas for an app like this.