Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash history is now available in new package react-router-dom #52

Open
rashmitpankhania opened this issue Jun 15, 2018 · 1 comment
Open

Comments

@rashmitpankhania
Copy link

No description provided.

@rashmitpankhania
Copy link
Author

please use BrowserRouter, also follow the reference

import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';

import IssueList from './issuelist.jsx';
import IssueEdit from './issueedit.jsx';


const contentNode = document.getElementById('contents');
const NoMatch = () => <p>Page not found.</p>;

const RoutedApp = () => (
  <BrowserRouter>
    <div>
      <Route path="/" component={IssueList} />
      <Route path="/edit" component={IssueEdit} />
      <Route path="/h*" component={NoMatch} />
    </div>
  </BrowserRouter>
);

ReactDOM.render(<RoutedApp />, contentNode); // Render the component inside the content Node

if (module.hot) {
  module.hot.accept();
}

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

No branches or pull requests

1 participant