rafgraph / react-router-hash-link

Hash link scroll functionality for React Router
https://react-router-hash-link.rafgraph.dev
MIT License
732 stars 62 forks source link

Allow "as" rendering to render as Button #105

Closed replaysMike closed 1 year ago

replaysMike commented 1 year ago

Or alternatively, a useHashLink() hook so we can trigger it programatically.

replaysMike commented 1 year ago

actually, I just answered my own question as I couldn't find this anywhere but tried it and works:

<HashLink smooth to={`/page/${name}#history`}>
  <Button size="mini" disabled={pageDisabled}>
    <i className="icon tiny" /> History
  </Button>
</HashLink>