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

Added state to .push #215

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Added state to .push #215

merged 5 commits into from
Sep 14, 2023

Conversation

AlexanderKaran
Copy link
Collaborator

No description provided.

@atlassian-cla-bot
Copy link

atlassian-cla-bot bot commented Sep 5, 2023

Hooray! All contributors have signed the CLA.

@albertogasparin
Copy link
Collaborator

Great start! Would you mind:

  • add state support also to the other imperative apis .replace, pushTo, replaceTo ?
  • add state support to Link via props <Link href="..." state={...} />
  • ensure that it is available and returned in the hooks (eg in useRouter) by adding 1/2 tests there too

Thanks!!

@AlexanderKaran
Copy link
Collaborator Author

@albertogasparin Added state to replace, pushTo and replaceTo. I also added state to the Link and changed it so we are not copying state and just using it from location. Due to the state being in location, I am not sure the extra setup and changes to the useRouter are needed as the four other functions get tested for a return in state and location is in useRouter

@albertogasparin
Copy link
Collaborator

Looks great! I have one last ask: can you mention it in the docs? So it's clear that those APIs and Link accept state and you can find the value inside location

@AlexanderKaran
Copy link
Collaborator Author

@albertogasparin Added an example and updated Link props, let me know if you need more

@liamqma liamqma merged commit 4e1982b into atlassian-labs:master Sep 14, 2023
2 checks passed
@AlexanderKaran AlexanderKaran deleted the add-state-to-push branch September 14, 2023 00:03
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