joriszwart.nl

I code dreamsโ„ข

Reactris

A language a year keeps the doc away A point had to be made Barking up the wrong tree Climbing the wrong hill esbuild Jest React Tetris TypeScript

Table of Contents

Introduction

This is a version of Tetris written using the React framework.

Play it! Source code Test coverage

Until now, my React experience has been limited to a small experiment1.

However, a vacancy from the Dutch Chamber of Commerce (KvK) triggered me ๐Ÿ˜ƒ They asked for a Frontend React developer Tetris2. I applied so quickly that I forgot to fill out most of the application form ๐Ÿ˜ฆ

I was turned down (quite rightly given my lack of React experience), but the idea of Tetris in React didn't let go and I opened my IDE… and here is Reactris! A reaction to corporate recruiters ๐Ÿ˜ƒ

Controls

Use cursor keys โ–ฒ โ–ถ โ–ผ โ—€ SPACE or I J K L M SPACE to control the game.

You probably need a recent version of Chrome, Firefox, (non-legacy) Edge or Safari to play it.

Build & Run

npm install
npm run test
tsc             # for verification (which esbuild does not do)
npm run build

Toolchain

(I hand-coded the config files because I want to truly understand what they do, this implies there could be a slip through and unneeded packages are included)

Version history

Date Description
2022-08-02 10:52:58 JavaScript version
2022-08-26 17:14:55 TypeScript version

My philosophy

A languageframework a year keeps the doc away!

Socials


  1. rascal. This was a PoC to show how to do React binding with three.js and loading Collada models. Didn't got the job either. Story of my life ๐Ÿ˜ƒ

  2. I should learn to read the full page instead of only the title.