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

docs: renamed hello state to name in hero section demo #611

Closed
wants to merge 1 commit into from

Conversation

johurul-haque
Copy link

The demo in the hero section contains the state for handling the input field. The state variables for that are hello and setHello; for storing the name of the user it would be better to rename them to name and setName.

Copy link

vercel bot commented Aug 14, 2024

@johurul-haque is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

@franky47
Copy link
Member

Thanks for the suggestion!

This is a good occasion to highlight something important with URL state: migrations like this can (and will) break existing URLs.

I don't mind merging the change in variable name, but the query key should remain the same to ensure existing URLs are still valid. But doing so, the variable name would be decoupled from its key.

So what's the best way to handle such migrations? One way is to rewrite the query string with middleware. It may break locality of behaviour, but it also centralises the migration code.

@franky47 franky47 added the documentation Improvements or additions to documentation label Nov 13, 2024
@franky47 franky47 added the wontfix This will not be worked on label Dec 17, 2024
@franky47
Copy link
Member

Closing as not planned: this would need a migration step, which we (currently) don't have an API for.

See also: #665.

@franky47 franky47 closed this Dec 17, 2024
@franky47 franky47 added the 🧟 zombieland Closed PRs to be reopened later label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation wontfix This will not be worked on 🧟 zombieland Closed PRs to be reopened later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants