Functional programming has been around since the 60s, and is rapidly rising back into popularity nowadays. Whether you are a total beginner to it, or you already know its fundamental concepts, I’d like to demonstrate how it could be applied to bring order in a React application’s code.(more…)
Set up your React environment with npm, babel and webpack
In my last tutorials, we used the handy
create-react-app package to set up our React app for us. I propose that we go a little more into the details and make our own setup from scratch.
Learn React State Hook by building a memory game
React offers a simple and efficient way to structure our application through function components. In this tutorial we will see how to make these components ‘react’ to the user actions by using the State Hook.
Test Driven Development, a practical start
Automated testing, sometimes clumsily referred as unit testing (because unit tests are a part of the broader concept of automated tests), is a practice in development in which I’m really interested. Its point is to have code that inspect your code, to see if the former behave like you expect. While it obviously makes you write more code, its goal is to pay back the time you’ve invested into writing your test code by helping you discovering the bugs you may introduce during your development iterations.
More specifically, what I will demonstrate in this post is how to start using a quite rigorous approach of this practice which is called Test Driven Development. This specific way of thought advocates to write your tests before you start writing your production code. This might seems a little weird when you hear about it the first time, because you will basically be testing something that doesn’t exist yet. So I will use a practical case where I implemented it to let you understand how it works and how it benefited me.(more…)