remix-run / react-router

Declarative routing for React
https://reactrouter.com
MIT License
53.03k stars 10.31k forks source link

One of the most misleading documentations i've ever seen #1330

Closed message closed 9 years ago

message commented 9 years ago

Sorry, for that rage, i'm just trying to make that router work almost for a few hours.

Here you have route handlers. Here you have components.

Then,

import BrowserHistory from 'react-router/lib/BrowserHistory';
<Router history={new BrowserHistory}>...</Router>

doesn't quite work with browserify, tried require("react-router/modules/BrowserHistory"); require("react-router/lib/BrowserHistory") which leads to Cannot find module.

message commented 9 years ago

Well, i guess master brach currently not on latest stable version, which raises a lot of WTFs

gaearon commented 9 years ago

Master is referring to 1.0 alpha. The stable docs are hosted here: http://rackt.github.io/react-router

@ryanflorence We really need to put that as the website in the repo settings.

gaearon commented 9 years ago

In the README, doc sections correctly refer to the stable version. We should probably add index.md to docs/ clarifying that you should look at the website instead..

audionerd commented 9 years ago

Also, the "What's it look like?" section of the README contains an example of Router setup from v0.13.3, https://github.com/rackt/react-router/blob/master/README.md#whats-it-look-like. So, if a person copies and pastes that to get started, but they're running on a more recent build than v0.13.3, they'll run into trouble.

The README would be more clear with a caveat re: which react-router version that specific example applies to. Or, maybe remove that example entirely, and replace it with a link to the examples on the gh-pages doc site?

rossthedevigner commented 9 years ago

@message Did you ever get this working? I'm running into the same issue on 0.13.3

gaearon commented 9 years ago

The README in master is always a work in progress. It is not meant to be anything you should use anyway.

When a stable version of 1.0 is released, you'll see guides and everything on the website.

message commented 9 years ago

Why just not use separate branch for development like all normal people and to keep master as latest stable version? It's not SVN, branching is easy

message commented 9 years ago

When you want to use new library at GitHub, you open repo and master is opened by default. I reckon 99% will assume it's latest stable version. So, whoever thought to make master as development, made dumbest decision in his life.

message commented 9 years ago

@rossthedevigner yeah, 2-3 hours later. Documentation: http://rackt.github.io/react-router/

gaearon commented 9 years ago

It's not SVN, branching is easy

Thank you for explaining!

So, whoever thought to make master as development, made dumbest decision in his life.

We hear you. We made a mistake in that 1.0 took much longer than we originally expected, and once the master started to point to 1.0, there was no going back. This is a temporary inconvenience, and in all fairness I'm not ready to say whether this confusion causes more harm than good, because if you are unaware of 1.0 coming, you'll have to change your stuff quite a bit when it comes out. Sure it's a mess right now, but at least people are aware of what's going on and are encouraged to try the beta version. I'm just saying it's a tad more complicated situation than what you paint it to be. Still, I totally get your frustration.

That said, maybe it's a good idea to be polite and respectful in an open source project discussion instead of accusing people of making “dumbest decisions in their lives” when they spend their free unpaid time to solve a hard problem for you. Just sayin'

message commented 9 years ago

I respect work of an open source community, but people tend to remember harsh criticism more than just "oh, I don't know why it doesn't work", so next time they will think twice to push development/breaking changes to master.