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

Router receive whole react context #1279

Merged
merged 1 commit into from
May 25, 2017

Conversation

langpavel
Copy link
Collaborator

This looks like trivial enhancement but when you extending context, you will see repeating yourself all the stuff from context to router..

@langpavel langpavel merged commit 7415429 into kriasoft:master May 25, 2017
@frenzzy
Copy link
Member

frenzzy commented May 25, 2017

Or alternatively, the context can be passed to the router's constructor once:

const router = new Router(routes, { context });

// ...
router.resolve({ path, query });

@langpavel
Copy link
Collaborator Author

Oh @frenzzy I was in hurry :-)
Is there real difference?

@frenzzy
Copy link
Member

frenzzy commented May 26, 2017

only aesthetic difference :)

@langpavel langpavel deleted the router-destructure-context branch February 7, 2018 05:44
n-parasochka pushed a commit to n-parasochka/react-starter-kit that referenced this pull request Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants