Comments (3)
from redux-query-sync.
As far as I can tell the main difference between the two routers that affect this package is the arguments with which the eventhandler gets called on page changes. Other than that the two are very similar. Reach was created by one of the guys that created React router. I think perhaps an extra optional argument like "useReach: true" in the config could be all that's necessary. And then an optional import in case this argument is passed, so that it imports the historyListener from Reach, and subscribes to that listener to be alerted on page changes. I'll upload the changes I made this week. so you can check it out and see what you think. Should be very minimal. Thanks!
from redux-query-sync.
Getting it to work was quite easy, I have the version with my additional commit up on GitHub. All that's required to get it to work is to pass a custom history object to the middleware, which should the globalHistory
object that comes with Reach router. Then you need to pass a flag reach: true
to make two minor changes to the way the module works.
It shouldn't cause any issues, and it's very straightforward, but I'm not entirely happy with the way it panned out. I can live with the monkeypatch function, as it's just there to make the two API's compatible, but I'm not too thrilled about using the globalHistory
module. Unfortunately Reach router's documentation is too limited at this point to be able to come up with something cleaner. In fact, as far as I can tell, the globalHistory
object is not even mentioned in their docs at all.
So it's nice that I got it to work, but integrating it in other packages is probably not a good idea yet. Perhaps in the future.
from redux-query-sync.
Related Issues (20)
- bulk dispatch doesn't fit for complex cases HOT 4
- action needs not only value but a state too HOT 8
- Explain where the `store` variable comes from in the docs example HOT 1
- Provide a full working example HOT 4
- More Documentation On Using History with React Router 4 HOT 1
- Unit test? HOT 1
- add `debounce` option to improve performance for high-volume actions HOT 2
- Does redux-query-sync work with Url hashes? HOT 2
- Case insensitive matches HOT 3
- Url encoded by URLSearchParams HOT 2
- defaultValue prevents a url parameter from being created HOT 4
- Support for multiple (array) values HOT 2
- Performance impact HOT 6
- Please Add some Demo Example HOT 2
- If condition of deleting location param doesn't support deep comparison HOT 3
- Possible to have one param depend on another? HOT 1
- replaceState per parameter? HOT 4
- Example - NOT FOUND HOT 1
- Clicking back button once cycles through all states and then goes back HOT 1
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 redux-query-sync.