inertiajs / inertia-rails

The Rails adapter for Inertia.js.
https://inertia-rails.dev/
MIT License
574 stars 45 forks source link

Lazy props #52

Closed bknoles closed 3 years ago

bknoles commented 3 years ago

Resolves #51

The code follows the design of the Laravel adapter pretty closely. The basic idea is to filter out any "lazy" props from initial page loads.

There's a new InertiaRails::Lazy class that acts like a callable prop.

I also took the opportunity to refactor the code that decides which props get filtered out within the renderer.