Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Inertia.js: New pattern to create server-driven single-page apps (reinink.ca)
42 points by kekub on April 22, 2019 | hide | past | favorite | 7 comments


Here's a not incomprehensive list of similar implementations of this idea: Phoenix Drab/LiveView/Texas, Razor Components, Plotly's Dash, Intercoolerjs/Unpoly (provides view layer only without websockets), Rails StimulusReflex, Ruby Fie, Python Sofi, Python Remi, Node.js Purview, Python Flexx, Python Reahl (AGPL licensed), Python Wdom.

I am sure I missed quite a few. Feel free to comment down below with any other library.


Hey there! Author of Inertia.js here. Inertia.js isn't really comparable to these libraries.

The goal of the libraries you listed is to avoid writing JavaScript entirely (or as much as possible), pushing this work to the server. Inertia.js, on the other hand, embraces using client-side frameworks like Vue.js and React, striving to find a happy medium between classic server-side rendered apps and full-on single-page apps.

Inertia.js allows you to create fully client-side rendered single-page apps without the need for client-side routing or an API. It uses classic server-side routing and controllers instead, which makes it super approachable to those coming from a server-side framework like Rails, Laravel or Django.


So something like stimulusjs? Out of curiosity, have you tried those websocket based Uİs and what are your thoughts on those?


Nice work! This is close to what I do with most new Rails app when I want more Asynchronous functionality.


This is a very good way of loading components dynamically, and the approach is pretty sound. We use the same technique at yazz.com to dynamically load components with Vue.js:

    <component v-bind:is="page.component"></component>


Quite a nice explanation of the pattern, I might try this setup.

No real need for the author to make another js lib out of it, but hey, doesn’t hurt.


Yeah this is a good way, I use that since around TypeScript and react really started working together, it's a bliss




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: