Skip to content

Conversation

thaiphan
Copy link
Contributor

@thaiphan thaiphan commented Jul 21, 2016

This change adds an example to the documentation on how to use the onEnter callback to redirect a user to another page.

thaiphan added 2 commits July 21, 2016 22:54
This change adds an example on how to use the onEnter callback to redirect a user to another page.
docs/API.md Outdated
`cb(err)`

```js
const userIsInAnOrganisation = (nextState, replace, callback) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the awful tiny nit, but I think we generally use AmE for docs, to the extent it matters. Maybe this could just be userIsInAnOrg?

@taion
Copy link
Contributor

taion commented Jul 21, 2016

Thanks! Left a couple quick notes.

@thaiphan
Copy link
Contributor Author

I've addressed your notes! I renamed "organisations" to "teams" to avoid any unnecessary contention in spelling.

docs/API.md Outdated
})
}

<Route path="/users/:userId/teams" onEnter={userIsInAnTeam} />
Copy link
Contributor

Choose a reason for hiding this comment

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

userIsInATeam

@taion
Copy link
Contributor

taion commented Jul 21, 2016

Sorry, a couple more notes. Thanks for updating the docs – this is a great help

@taion
Copy link
Contributor

taion commented Jul 22, 2016

Thanks again!

@taion taion merged commit 5538899 into remix-run:master Jul 22, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants