TX-2 / TX-2-simulator

Simulator for the pioneering TX-2 computer
https://tx-2.github.io/
MIT License
21 stars 2 forks source link

Fix overcomplex callaback scheme in the React UI #92

Open jamesyoungman opened 2 years ago

jamesyoungman commented 2 years ago

In tx2-web/src/AlarmPanel.tsx there are callbacks into controller/alarm.ts, and also callbacks in the opposite direction. With a callback registry.

There is a similar picture between tx2-web/src/IoPanel.tsx and controller/io.ts.

This seems more complex than necessary. Someone more experienced with React than I am can likely suggest a simpler approach.