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

[gatsby-link] Added handling of replace property. #8081

Merged
merged 3 commits into from
Sep 13, 2018

Conversation

tomsseisums
Copy link
Contributor

Reach Router has it.
React Router has it.
Probably any other router out there has it too.

A need arose for me to have such functionality, was surprised it doesn't exist, so, I made one.
The need for me is opening/closing modals, not really looking for them to be stored in history.

I'm not sure if this won't have to be changed once reach/router#119 lands, but in the same fashion as scroll behavior has been fixed for now, made the quick-fix here.

@tomsseisums tomsseisums changed the title Added handling of property. Added handling of replace property. Sep 12, 2018
@pieh
Copy link
Contributor

pieh commented Sep 12, 2018

Code looks good - could you document this prop in https://github.com/gatsbyjs/gatsby/blob/master/docs/docs/gatsby-link.md ? It actually would be great, if we would have list of props there (noting which ones are required), but just adding something about replace would be enough

@tomsseisums
Copy link
Contributor Author

Yeah, will do.
Forgot about docs. :(

@pieh pieh changed the title Added handling of replace property. [gatsby-link] Added handling of replace property. Sep 12, 2018
Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@DSchau DSchau merged commit cd25149 into gatsbyjs:master Sep 13, 2018
@gatsbot
Copy link

gatsbot bot commented Sep 13, 2018

Holy buckets, @joltmode — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (Currently we’ve got a couple t-shirts available, plus some socks that are really razzing our berries right now.)
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@tomsseisums tomsseisums deleted the topics/gatsby-link-with-replace branch September 13, 2018 13:02
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