Easily use SVG files in React Native with react-native-svg-transformer

React Native SVG transformer allows you to import SVG files in your React Native project the same way that you would in a Web application when using a library like SVGR to transform your imported SVG images into React components. This makes it possible to use the same code for React Native and Web. Oh, …

Princesses make terrible passwords

From the Firefox Blog: When the Disney+ streaming service rolled out, millions of people flocked to set up accounts. And within a week, thousands of poor unfortunate souls reported that their Disney passwords were hacked. According to media reports, some Disney+ account holders have lost their account access while hackers have sold their logins online. …

Single div CSS Tesla Cybertruck

Of course it had to be done: What I found most peculiar is that only the front lights are generated content, all the rest is gradients. Only detail that’s missing are the smashed windows 😜 Oh, Here’s another nice version (no single div though): See the Pen Pure CSS CYBRTRK 🚙 by Jhey (@jh3y) on …

React: Fetching data with lifecycle methods, hooks, or suspense — a comparison

Dmitri Pavlutin has compared the several ways to fecthing data in React. Lifecycle methods had been for a long time the only solution to fetching. However fetching using them has problems with lots of boilerplate code, duplication, and reusability difficulties. Fetching using hooks is a better alternative: way less boilerplate code. Suspense’s benefit is declarative …

Change the marker of a list to any character with list-style-type: <string>

Since CSS Level 2, CSS list-style-type has supported keywords like disc or decimal to define the appearance of the list item marker. Landing in Chrome 79, and also available in Firefox ever since version 39, is the ability to set it to an arbitrary string. Here’s a pen that demonstrates its behavior / usage: Let’s …

Gone Diving

Right now I’m packing my bag, as I’m leaving for vacation tomorrow. I’ll be going on a 10 day diving-trip to Tulum (Mexico) with my diving club Bubbledivers. It’s the first time I’m going to Mexico, and the first time I’ll be diving the Cenotes. Cenote diving in Tulum (All Mexico 365) It’s a welcome …

How We Built the World Wide Web in Five Days

At the most recent edition of Fronteers Conference – a conference which I’ve been attending for over 10 yeras by now – Jeremy Keith & Remy Sharp did a two-person talk on their rebuild of the original WorldWideWeb application back in February. Join (Je)Remy on a journey through time and space and code as they …

My favourite Git commit

David Thompson on his favorite Git commit: a single character fix, but with one hell of an explanation: In a different organisation, from a different developer, this entire commit message might have been change whitespace, or fix bug, or (depending on the team’s culture) some less than flattering opinions about the inventor of the non-breaking …

Programmatically add scripts to package.json with npm-add-script

Recently I needed to automate the addition of the addition of a script defined in a package.json‘s scripts section. To do this I used npm-add-script (an older, but still functioning project), along with the aforementioned npx. For example, to add a script labelled start with the contents webpack-dev-server –config ./config/webpack.config.babel.js –env.MODE=development –open –hot, I use: …

One simple trick to optimize React re-renders

Kent C. Dodds: If you’re experiencing React performance issues, try this: “Lift” the expensive component to a parent where it will be rendered less often. Then pass the expensive component down as a prop. You may find doing so solves your performance problem without needing to spread React.memo all over you codebase like a giant …