Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to mutate page props #1633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinnygambiny
Copy link

This PR allows mutating the page props with the usePage function.

This is for these situations #78

You have only to do usePage().props.valueName = 'newValue'

@punyflash
Copy link
Contributor

I don't think that should be a thing. Data which loaded the page should be accessible all the time, no matter what. In case you need it to be reactive and changeable - just create a custom reference that was initialized with the prop value.

@innocenzi
Copy link
Contributor

@punyflash there are definitely situations where this would be handy (eg. infinite loading), and Inertia should be more flexible about this.

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.

None yet

3 participants