react-redux in a real application - prelude

26 Jul 2017 in web | programming | react | javascript |

In the good tradition of this:

ts auto-complete

Let us leave the realm of hello world and jump straight into building an Application.

The application source code is found here, and a usable version is here.

There are three reasons for this application to exist:

  • Have a reference react application that is not a To-Do app and hence has a little bit more meat on it
  • Have a reference application that can I can port to those UI stacks that interest me, most notably elm
  • Learn to morse 😁

The application itself helps you to learn morse code. You can see how letters from the english alphabet, important punctuation and numbers look like in morse code, you can train yourself in reading and writing, and you can review your progress over time. Note that training results only end up in the browser’s local storage, so if you use this in earnest, keep using the same browser to get training results over time.

After a quick glance through the code you may notice and say…

You introduced me to TypeScript and now you wrote the app in JavaScript, I don’t even…

My relationship to TypeScript is a bit strange. A rational part of me says that it makes sense to use it, and big projects are applying it successfully, but when I code on a small-ish app, I seem to be more productive in js when compared to ts. Also, the create react app setup introduces a linter that squashes my most common mistakes (mistyped stuff, dangling references after moving files, etc.).

I reserve my judgment for situations where the project may grow larger, but then I always think that before learning TypeScript, going the full way towards e.g. elm-lang or fable, or reason may make more sense to me. So, forgive my use of js on this small application, as it was more important for me to have a nice redux-based app to work with than proving other things.

Over the following posts I will be highlighting some aspects of the app, after which the idea will be be to port it to elm-lang and see how that goes. Other porting targets that would be interesting when time permits


comments powered by Disqus