Skip to content

Documentation for UsageWithReactRouter.md #1929

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

Merged
merged 17 commits into from
Sep 4, 2016

Conversation

vnctaing
Copy link
Contributor

@vnctaing vnctaing commented Sep 3, 2016

Hi,

I saw that there were no documentation yet for React-router(#1919). So I tried to create documentation following Dan's series on Egghead.io

Do we have to create an example to /examples for this chapter ?

This is my first significant PR to OSS, there are probably unclear explanations or mistakes in my PR I apologize for that I am still a junior dev.

How can I make my PR better ?

Thanks

@vnctaing vnctaing changed the title Documentation : first draft for UsageWithReactRouter.md Documentation for UsageWithReactRouter.md Sep 3, 2016
@gaearon
Copy link
Contributor

gaearon commented Sep 3, 2016

Wow, this is so good. Thanks for stepping up and actually doing it.


## Redux-router, react-router-redux, react-router
Before starting, let's clarify the different routing libraries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a section on React Router first and make it clear you can use it directly with Redux just fine. Many people don't realize this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact I’d like to completely deemphasize these other libraries here and maybe add them as a footnote. Let’s focus on RR instead.

@gaearon gaearon added the docs label Sep 3, 2016
So you want to do routing with your Redux app. You can use it with [React Router](https://github.com/reactjs/react-router). Redux will be the source of truth for your data and React Router will be the source of truth for your URL. In most of the cases, **it is fine** to have them separate unless if you need to time travel and rewind actions that triggers the change URL.

## Installing React Router
`react-router` is available on npm :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call it React Router here too.
Please remove space before colon.

@timdorr
Copy link
Member

timdorr commented Sep 4, 2016

This is great! I'm going to merge in now. If any other changes are needed, @vnctaing can do a follow-up PR. I'll get this published on the docs site in a second...

@timdorr timdorr closed this Sep 4, 2016
@timdorr timdorr reopened this Sep 4, 2016
@timdorr timdorr merged commit 2bb29a2 into reduxjs:master Sep 4, 2016
seantcoyote pushed a commit to seantcoyote/redux that referenced this pull request Jan 14, 2018
* Documentation : first draft for UsageWithReactRouter.md

* uses React Router in writting, emphazises React Router in the introduction

* transforms title to CamelCase

* changes 'back-end' to 'development server', adds missing backticks

* adds extension .js to title, fix grammar

* adds missing semi-colons in code examples, adds space on self-closing tag, use PascalCase in configuration part titles

* fix grammar on 'the todo list is not filtered'

* fix innacurate information about Provider and Router relationship

* adds a Next Steps section, adds a foot note about other routing libraries

* clarifies 'the Router' > 'React Router'

* mentions react-router package version

* precises description in fallback url

* rephrase in more concrete way the fallback URL configuration, adjust create-react-app header

* uses 'url'> 'URL'

* explains in a more conversational way how bind with React Router, 'Express.js' > 'Express', 'Webpack Dev Server' > 'WebpackDevServer'

* fix grammar

* removes space before colon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants