Posts in "Tech"

Protect your git branches with Husky

tl:dr To add a pre-commit git hook with Husky: Install Husky with npm install husky –save-dev Set the pre-commit command in your package.json: “scripts”: { “precommit”: “npm test” }, What are git hooks? Git hooks are scripts launched when carrying out some git actions. The most common one is the pre-commit hook that runs when performing… Continue reading

Next.js: Use Server-Side Rendering in your React App // Part 1

Usually, we are completely running React.js on client-side: Javascript is interpreted by your browser. The initial html returned by the server contains a placeholder, e.g. <div id=”root”></div>, and then, once all your scripts are loaded, the entire UI is rendered in the browser. We call it client-side rendering. The problem is that, in the meantime, your… Continue reading