Skip to content

Deprecate use_inertia_instance_props #239

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

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

Conversation

skryukov
Copy link
Contributor

While use_inertia_instance_props is a clever way to mimic Rails behavior, it also exposes too much data on the frontend side, which is very dangerous. Therefore, I propose deprecating it.

@bknoles
Copy link
Collaborator

bknoles commented Jul 7, 2025

exposes too much data on the frontend side

You mean becuase it's calling .to_json without any way to configure it (potentially exposing some fields you shouldn't send to the client)? I don't really use that feature myself, so I want to make sure I understand Problem Land.

@skryukov
Copy link
Contributor Author

skryukov commented Jul 8, 2025

yup, that's the main one, but I can think of cases when you simply memoize something and inertia passes that to FE as well.

@BrandonShar
Copy link
Collaborator

I don't use use_inertia_instance_props personally, but I've always seen it as a sharp knife.

I'm fine with discouraging the use of it, but (at the moment at least), I don't think the bar is high enough to deprecate it. Especially since it's opt-in.

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.

3 participants