Martin Capodici

How to create an object and hang onto it for the life of a component using hooks.

In React, the way you do code with class components vs. hooks is completely different. If you are used to classes, things you are comfortable with no longer work like that. For example: you need to keep hold of an object for the lifetime of your component. How to do that with hooks? This is …

How to create an object and hang onto it for the life of a component using hooks. Read More »

Setting up a React Project, when to use create-react-app, vs. a DIY approach.

If you have used create-react-app to start a React project it is a piece of magic! It will set up everything you need to start you next React Project. But it does leave some questions. What is it doing behind the scenes. Why does it have 100Mb or more of dependencies? Is it using lot’s …

Setting up a React Project, when to use create-react-app, vs. a DIY approach. Read More »

How to update fees in your React shopping cart based on check boxes.

I saw this question on Reddit recently: “I’m currently writing an app that will apply a $25 fee amongst others that are depending on if the checkbox is checked or not. It’ll add the fee if it’s checked, but if the check is removed afterwards it’ll still keep the fee added on, how can I …

How to update fees in your React shopping cart based on check boxes. Read More »

Need a comprehensive React course that is modern, and with code that isn’t broken? This is the course I recommend in 2020.

Hey folks. There are alot of React courses out there, and a lot of them suck for various reasons. A problem with all tech courses is they go stale – the code that worked in April 2019 no longer works because things have moved on. The concepts they teach are no longer modern. And many …

Need a comprehensive React course that is modern, and with code that isn’t broken? This is the course I recommend in 2020. Read More »

How to find time to keep up with coding when you are a tech lead? 3 tips that work from someone who has been there.

If you have recently been promoted to tech lead, or doing it for a while, you’ll deeply appreciate that there is hardly any time for coding, or maybe zero time at all. There are a lot of people related things to do, project planning things to do, improving for the future or responding to emergencies. …

How to find time to keep up with coding when you are a tech lead? 3 tips that work from someone who has been there. Read More »

Too many hooks in your functional component? Let’s find out if you have too many hooks, and if so, how do you fix it?

You have a functional component with 5, 10, 15 hooks? And you are wondering if it’s too much, maybe you have chosen the wrong tool for the job. A hammer instead of a drill. And perhaps the right tool is a class based component? Or something else? Redux!!? Well before you throw out the baby …

Too many hooks in your functional component? Let’s find out if you have too many hooks, and if so, how do you fix it? Read More »