Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stutrek/internal-link-router

A React component that turns clicks on links to routing actions
https://github.com/stutrek/internal-link-router

Last synced: about 1 month ago
JSON representation

A React component that turns clicks on links to routing actions

Awesome Lists containing this project

README

        

# Internal Link Router

This is a React component that wraps your app and intercepts clicks on elements. If there's an href attribute that starts with `/` it will cancel the click and dispatch a react routing event. If there's a hash it will smoothly scroll the specified element into view.

## Basic Usage

```javascript
function startApp (routes) {
ReactDOM.render((



{ /* all your other routes */ }


), container);
}
```