larrymyers / react-mini-router

A minimal URL router for React.js
MIT License
282 stars 38 forks source link

Conflicts with React Router 1.0.0-rc1 #40

Closed Merri closed 8 years ago

Merri commented 8 years ago

I'm adding React Router for server side rendering, while I have React Mini Router for hashbang usage within a non-indexable client-only app. The issue is that React Router passes history object internally to every component it renders. React Mini Router uses this value to go itself to non-hash mode, which means when React Router renders the component React Mini Router will never go into hash mode.

Thus I think the check for history property should be explicit true value; or a more descriptive prop name should be used instead, because history={true} doesn't really tell what is going to be true; with React Router history prop is more understandable as you need to create a history object and pass that.

larrymyers commented 8 years ago

If you can submit a pull request that would be appreciated. Using two different routers in the same application isn't a use case that I need for any of the projects that use this library.

Merri commented 8 years ago

FYI I'm now refactoring codebase to only use React Router; quite a bit of more work to do and there will be some issues as I can't focus on every issue as I have to get things to production asap, but the result is cleaner overall.