Skip to content

[3.x] Fix memory leak and potential caching issue with usePage#1366

Merged
taylorotwell merged 1 commit into3.xfrom
usepage-usage
Aug 23, 2023
Merged

[3.x] Fix memory leak and potential caching issue with usePage#1366
taylorotwell merged 1 commit into3.xfrom
usepage-usage

Conversation

@jessarcher
Copy link
Member

@jessarcher jessarcher commented Aug 23, 2023

This PR fixes a memory leak and potential caching issue in the Vue stack when calling usePage inside a computed prop or watcher.

usePage should be called at the top level of <script setup> per the example in the docs at https://inertiajs.com/shared-data#accessing-shared-data.

See inertiajs/inertia#1602 (comment) for more information.

@taylorotwell taylorotwell merged commit 6660ede into 3.x Aug 23, 2023
@taylorotwell taylorotwell deleted the usepage-usage branch August 23, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants