Extra services for react-services to simplify common tasks.
Install react-services-extras with
npm install react-services-extras
Require any services you need with
require("react-services-extras/NavService")
For implementing navigation for your single page application.
Up to date path for the current URL. Defaults to current document.location.pathname when service is first required. Subscribe to this in your router component.
Navigate to a new URL. If pushState is unavailable, document.location.href is overwritten instead. Handles relative URLs.
The current title of the page. Fetched from the <title>
element.
Update the current title of the page. Sets the content of the <title>
element.
Allows you to access jQuery.
Polls typeof $
until jQuery becomes available. If unavailable, returns null.
Allows you to access DOM elements.
Returns the document
object in browser.
Returns the window
object in browser.
Returns the history
object in browser.