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

Allow to pass config with history #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cursedcoder
Copy link

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

This introduces config to react3 router, so tests now can be run using any external history.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 97.189% when pulling 0ae27d3 on cursedcoder:feature/react-router-config into 4bb126c on trialspark:master.

@minznerjosh
Copy link
Contributor

Thanks for the PR! Can you provide some more context on your use-case for this feature? Why is the MemoryHistory that the react-router plugin creates for you not working?

@cursedcoder
Copy link
Author

I want to test the whole application without changing any components it uses.
In my case replacing hashHistory with memoryHistory introduces different behavior during testing.

Take aside my case, you can see this code looks like it is doing too much under the hood without external input. I think package users should have a little bit more control over that.

@cursedcoder
Copy link
Author

For anyone curious about workaround, here is a snippet without typescript https://gist.github.com/cursedcoder/a222884a8e13ec3c66ff82857ec171bf

@cursedcoder
Copy link
Author

@minznerjosh any news?

Copy link
Contributor

@minznerjosh minznerjosh left a comment

Choose a reason for hiding this comment

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

Sorry for the ridiculous delay! Let's ship this! Can you just update the docs to include this new configuration option?

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

Successfully merging this pull request may close these issues.

None yet

3 participants