Update: Please see the blog post Update on the current Inertia.js state.
I've been following Inertia.js development for quite some time now and was very hyped at the beginning of the year, with the release of the first publicly available SSR adapter.
Based on the Inertia.js React Adapter, I released the initial version of the Inertia.js Preact Adapter and a Preact variant of the Ping CRM demo.
Since then, not much has happened at Inertia.js. Besides numerous unanswered issues and pull requests, there is a statement from developer Jonathan Reinink, who explains his philosophy on the project.
Direct link to this sectionLaravel 9 compatibility
Looking at the development of Laravel, on the other hand, a lot has happened. The biggest change in the last versions is the replacement of Laravel Mix with Vite.
Although it's currently hard to be more specific about the future of Inertia.js, I decided to release a new version of the Preact Adapter. Additionally I have updated the Preact variant of the Ping CRM demo with some optimizations.
Direct link to this sectionWhat the docs...?
The Inertia.js documentation is out of date. Pull requests with updated installation details are not answered nor accepted. Some of them are breaking changes. To simplify the installation of the Preact Adapter, an up-to-date, detailed installation guide will be provided here soon. Additionally there will be a Laravel preset for the adapter available soon.
Direct link to this sectionInstallation
Install the Preact adapter as npm module.
npm install @jrson83/inertia-preact -D
Direct link to this sectionRelease Notes
The following release notes are taken from the changelog.
Direct link to this sectionInertia.js Preact Adapter v0.2.0 - 2022-12-06
Added
- Added
@types/node
dependency
Fixed
@types/node
should fix TypeScript error when usingresolvePageComponent
fromlaravel-vite-plugin
Changed
- Updated README.md
- Updated dependencies:
@babel/plugin-transform-react-jsx
@inertiajs/inertia
microbundle
preact
preact-render-to-string
prettier
Removed
- Removed ESLint config
- Removed dependencies:
@yandeu/prettier-config
eslint
eslint-config-preact
eslint-plugin-jest
jest
Direct link to this sectionConclusion
If you have read the blog post, you can guess my opinion about Inertia.js philosophy. However, I would appreciate any input regarding improvements or tweaks to the adapter.
Helpful Resources: