inertiajs / inertia

Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
https://inertiajs.com
MIT License
6.02k stars 405 forks source link

Major issues with inertia #1905

Closed kejedi closed 1 week ago

kejedi commented 1 week ago

Version:

Describe the problem:

Inertia still uses the renderToString method rather than renderToReadableStream

This means that a number of react features are unavailable. Other front end libraries also have streaming options for rendering.

If you used the latter method, you could also have your layout file in jsx rather than php. Meaning all your front end code would be in the same language

Another major issue - inertia also places props inside html elements which makes the performance disgusting if your page contains a lot of data.

Again, if you were using renderToReadableStream, you could use the bootstrapModules and bootstrapScriptContent methods to inject the prop data as a proper script tag

I realize this would cause breaking changes and would probably require a major version update. If you are interested in resolving these problems then I am willing to submit a PR

If this is just going to be closed as a "feature request" I will not waste my time

Steps to reproduce:

Install inertia