Skip to content

Update docs for easier integration with react-router using React Hooks#2401

Merged
chandlerprall merged 4 commits intoelastic:masterfrom
imballinst:use-react-hooks-for-router
Oct 9, 2019
Merged

Update docs for easier integration with react-router using React Hooks#2401
chandlerprall merged 4 commits intoelastic:masterfrom
imballinst:use-react-hooks-for-router

Conversation

@imballinst
Copy link
Contributor

@imballinst imballinst commented Oct 4, 2019

Summary

This PR is a follow-up to #1976. Since react-router 5.1, there is an opportunity to make integration with this @elastic/eui easier -- with the use of useHistory.

You can see the sample repository here: https://github.com/Imballinst/elastic-react-router-hooks. I also added this link to the README should there are future users want to try it right away.

And for the GitHub pages of that app: https://imballinst.github.io/elastic-react-router-hooks/

Signed-off-by: Try Ajitiono <ballinst@gmail.com>
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@imballinst imballinst changed the title Update docs for easier integration with react-router with React Hooks Update docs for easier integration with react-router using React Hooks Oct 4, 2019
Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Thank you very much for updating the routing documentation! The useHistory hook is definitely much more straight-forward to use. There are two changes I'd like to see, but I think your example is great (and seeing it in action at https://imballinst.github.io/elastic-react-router-hooks was a big help too.

Additionally, you'll need to sign our CLA (https://www.elastic.co/contributor-agreement) using the email address associated with your github account before we can accept this change.

Signed-off-by: Try Ajitiono <ballinst@gmail.com>
@imballinst
Copy link
Contributor Author

@chandlerprall I have adjusted the PR according to your requested changes and signed the CLA. Please take another look and feel free to let me know if there are nits. Thanks!

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Thanks again @imballinst for this update!

@chandlerprall chandlerprall merged commit 7e8e921 into elastic:master Oct 9, 2019
snide pushed a commit to snide/eui that referenced this pull request Oct 10, 2019
elastic#2401)

* Update docs for easier integration with react-router with React Hooks

Signed-off-by: Try Ajitiono <ballinst@gmail.com>

* add CHANGELOG.md

Signed-off-by: Try Ajitiono <ballinst@gmail.com>

* remove changelog entry, re-add react-router handling for 5.0

Signed-off-by: Try Ajitiono <ballinst@gmail.com>
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