Update docs for easier integration with react-router using React Hooks#2401
Conversation
Signed-off-by: Try Ajitiono <ballinst@gmail.com>
|
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? |
Signed-off-by: Try Ajitiono <ballinst@gmail.com>
chandlerprall
left a comment
There was a problem hiding this comment.
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>
|
@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! |
chandlerprall
left a comment
There was a problem hiding this comment.
Thanks again @imballinst for this update!
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>
Summary
This PR is a follow-up to #1976. Since react-router 5.1, there is an opportunity to make integration with this
@elastic/euieasier -- with the use ofuseHistory.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/