Vite with Laravel: Using Inertia.js
How to set up Inertia.js in Vite with Laravel.
by sebastian de deyne
How to set up Inertia.js in Vite with Laravel.
From Anne-Laure Le Cunff:
An antilibrary is a private collection of unread books. […]
The goal of an antilibrary is not to collect books you have read so you can proudly display them on your shelf; instead, it is to curate a highly personal collection of resources around themes you are curious about. Instead of a celebration of everything you know, an antilibrary is an ode to everything you want to explore. […]
An antilibrary creates a humble relationship with knowledge. It reminds us that our knowledge is finite and imperfect.
I have more unread books than read, and at some point I decided to stop buying books until I read more of the ones I owned.
After learning about the antilibrary, I lifted my own restriction and started to buy books again. The result: I’ve been reading more than ever.
I occasionally send out a dispatch with personal stories, things I'm working on, and interesting links I come across.
How to set up TypeScript in Vite with Laravel.
How to set up React in Vite with Laravel.
How to set up Vue.js in Vite with Laravel.
How to set up Tailwind CSS in Vite with Laravel.
How to set up Tailwind CSS in Vite with Laravel.
I’ve had an eye on Vite for a while. With a stable release out the door (2.0, as 1.0 never left the release candidate stage) it seemed like a good time to give it a shot.
Vite is a frontend build tool like webpack. Instead of bundling development assets, Vite serves native ES modules transpiled with esbuild from the dev server. This means there’s a lot less bundling to do, and results in a very fast developer experience. For production builds, Vite uses Rollup to bundle the assets.
Mac is case insensitive, Linux isn’t. This has caused me trouble in the past after deploying my code to an Ubuntu server.
If you rename a file on Mac, git won’t pick up any changes if you only change the case.
Henrik Nyh suggests to make comments more resilient to change with double-entry bookkeeping.
- $timeoutMs = 1000; // Equals 1 second
+ $timeoutMs = 1000; // 1000ms equals 1 second
Whether the discrepancy is caught immediately by the author, or in review, or by another developer far down the line, it will be explicitly clear that the comment was not intended for the current value.
This lowers the odds that a comment will get out of sync, especially useful in configuration files.
For more context head to Henrik’s blog, The Pug Automatic.
When I set up a new Mac, there are a few things that make it immediately feel “off” to me. These are the small System Preferences tweaks I make that my muscle memory relies on.
Around the end of January, I decided to take a break from Twitter for an undetermined amount of time. Twitter was my main source of distraction, and I wanted to find out how much it affects my productivity.
RoyalSloth reviews the three most common patterns to model interconnected state in a user interface.
- Connect the boxes: create the user avatar component and pass its instance to the inventory table component
- Lift the state up: move the internal state of the user avatar component and the state of the inventory table into a separate box/class
- Introduce a message bus: connect the inventory table and the user avatar component to the shared pipe that is used for distributing events in the application
Connect the boxes and lift the state up seem to be the most common choices for React apps; respectively prop drilling and context or single state trees (like Redux).
There’s no silver bullet to UI complexity, all methods have their caveats.
Read the full article on blog.royalsloth.eu.
I rediscovered jq the other day, a little command line tool to format, read, and transform JSON from the command line.
Jq falls into one of my favorite categories of tools: the “simple and do one thing good” category—the Unix philosophy at its finest.
There are two bike stalls near my apartment. One is right in front of the door, the other around the corner. The one in front of the door is closest, so when I can, I store my bike there. However, most of the time that stall is full, and I need to go around the corner instead.
That’s fine. Until a next morning–when I’m still in a daze because I’m not a morning person–I take the walk around the corner, only to realise my bike was actually in front of the door. The day before was one of those lucky days I could store my bike in front of the door.
I quit using the front stall. The less choices I have to make, the more room I have for important things.