Keep your FE dumb!

Try to keep your client as dumb as possible, to achieve this you should avoid the following: In many cases your service layer can take the heavy lift away from the FE which takes away complexity/ risk and avoids duplicating/ mutating business logic + domain sources of truth.

Javascript – loop efficiency

I want to run through a scenario that highlights how loop performance can be very poor…when poorly considered, and you might not realise it if the code “works”. Consider this scenario – the database has a table of 30,000 bookings for a collection of tennis courts, for each booking there is a startDate and an… Continue reading Javascript – loop efficiency

Published
Categorized as Javascript

Javascript – hoisting

Recently I had to refactor a very large react class component into a function component, the overall goal was to keep the business logic the same, but add thourough typing so the risk of regressions from a much larger refactor later would be lower. I ran into a problem with this, it seemed at first… Continue reading Javascript – hoisting