Running the same Node.js code on Google Cloud Functions, App Engine, and Cloud Run

Google Cloud has a number of options to run your code. We can deploy a function to Cloud Functions, an app to App Engine, or an app with a custom runtime (a Docker container) to Cloud Run. In this post the same code snippet is deployed to all three Google Cloud Platform features. Locally the […]

Subtract

Derek Sivers, on how to improve life, not by adding things but by subtracting things: The least successful people I know run in conflicting directions, are drawn to distractions, say yes to almost everything, and are chained to emotional obstacles. The most successful people I know have a narrow focus, protect themselves against time-wasters, say […]

react-native-v8 – Opt-in V8 runtime for React Native Android

The aim of this project is to support V8 runtime for React Native. Designed as opt-in package, it should easy to integrate with existing React Native projects. After installing it, you’ll need to adjust your build.gradle files so that it includes the new runtime — a/android/app/build.gradle +++ b/android/app/build.gradle @@ -161,11 +161,18 @@ android { } […]

How to Implement Redux in 24 Lines of JavaScript

90% convention, 10% library In this post Yazeed Bzadough walks you through creating your own Redux implementation. // simplified createStore function const createStore = (yourReducer) => { let listeners = []; let currentState = yourReducer(undefined, {}); return { getState: () => currentState, dispatch: (action) => { currentState = yourReducer(currentState, action); listeners.forEach((listener) => { listener(); }); […]

React Hook Form – Form Validation Hook based on Uncontrolled Components

Now this is an interesting approach, building further upon Uncontrolled Components: The React Hook Form (react-hook-form) library provides a new form validation mechanism which embraces uncontrolled form validation and support controlled components. The core idea is to register HTML input’s ref into the custom hook and therefore subscribe to its input value, validate and evaluate […]

Run Lighthouse in a CI Pipeline using lighthouse-ci

Lighthouse CI is a set of commands that make continuously running, asserting, saving, and retrieving Lighthouse results as easy as possible. npm install -g @lhci/[email protected] lhci autorun –upload.target=temporary-public-storage || echo "LHCI failed!" Comes with default configurations for Travis, GitHub Actions, Circle CI, GitLab CI, and Jenkins. lighthouse-ci →