65 why did I choose to use react+typescript for a project I do for someone? The amount of steps it takes to "compile" it every time I want to test is just.... annoying >_<
The first part is typescripts tooling. This is purely to go from Typescript to javascript that works in as many browsers as possible.
We start with the linter. This makes sure your code follows some standards. So far, so good.
We then compile to JS. This is needed as browsers are stupid and only can run Javascript. Again, so far so good.
I think this JS then gets compiled again to an older standard of JS. I'm not sure about that though.
For normal projects, this is it. The generated JS is placed somewhere where your webserver can read it and you are a simple refresh away to see your code in action.
However, I'm using cordova. Which, is not just a simple webserver. So..... more steps are needed.
It now combines your new awesome content that has been written to run on all its platforms with any code that you have written for specific platforms. That way, if method x works on all but 1 platform you can do method y specifically on just that platform.
After that, it either needs to boot up its own webserver hosting the combined code, "compile" it to an app for android or IOS, an .exe for windows or a binary for linux depending on what you platform you want to test it on.
After this, it needs to run this program. In my case, as I am using it foremost to create a web application it opens a new tab in my default browser pointing to the index page.
Note how it opens a tab in your default browser. As far as I know, this can not be turned off. So, if like me you use another browser to actually develop the new tabs won't open there. Additionally, YOU CAN'T EVEN REFRESH PROPERLY! Because unlike servers like apache or nginx the server that cordova uses has no way to set custom routes.
Meaning that an url like /users/123 will always make it try to load a file in the users folder called 123. Making it impossible to use the url as a way to store at which page you are.