inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

Preserve props on partial reloads

Open lepikhinb opened this issue 2 years ago • 0 comments

This PR introduces an ability to preserve properties on partial reloads even if they aren't specified on a request.

Inertia::preserveProperties(['alert']);

While only is great within a context, there could be a global state with properties that need to present on every get request. So, it makes sense to control them from a backend to ensure that required props are always present on the response.

Examples:

  • Alert notifications
  • Popups (onboarding)
  • Auth user data

So, any global state that's independent of a current context.

lepikhinb avatar Jun 22 '22 01:06 lepikhinb