Comments (6)
Hmmm, that's a use-case I hadn't considered before. I think it would be safe to place it right inside of the config.
makeHistoryDriver({
hash: true,
history: createHistory(.....)
})
Then if it's present skip creating it internally. What do you think?
from history.
It would be fine, I think even better.
I tried a quick hack on forked code and react-router doesn't react to history changes even it shares the same history instance. But I think I'm doing something wrong, based on https://github.com/rackt/react-router/blob/v1.0.3/docs/guides/advanced/NavigatingOutsideOfComponents.md, it should work. I need to put some more time into it. It doesn't look like there is any blocker inside of HistoryDriver, looking at the src. Location gets changed in browser bar.
from history.
Yeah, this driver should have a care in the world about where the route changes come from.
Feel free to ask any question. I'll gladly help if I can.
from history.
Today it works while I changed nothing, haha.
I just added this simple code:
const history = config.history ?
config.history :
makeHistory(hash, queries, options)
I think it is too much hassle to go through my own PR, hence if you think it is beneficial to add it (or any variant as seen fit) feel free to do so at some point.
Many thanks for your help
from history.
I have finally managed to create PR for it.
from history.
Merged, I'll push to NPM shortly.
from history.
Related Issues (9)
- Wrong main script in package.json HOT 3
- In Universal example issue with ongoingContext$ in app.js file... HOT 3
- Navigating to a url, then hitting browser back, followed by attempting to navigate to the same page again dosen't work. HOT 5
- Routing does not switch away from a constantly updating page HOT 3
- `makeHistoryDriver` should output the initial location. HOT 1
- makeHistoryDriver throws error for a proper history object HOT 1
- Update to history 3.0.0 HOT 14
- captureClicks captures anchor link clicks HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from history.