Comments (3)
Thanks for the replies. I was thinking primarily about angular (2+), but then it seems using ngrx/store is the way to go with that.
from redux-first-router.
Totally! The core dependency of redux-first-router is Redux, which is unrelated to React:
From the very beginning, we need to stress that Redux has no relation to React. You can write Redux apps with React, Angular, Ember, jQuery, or vanilla JavaScript.
Just dispatch actions to navigate. The Link
component does depend on React but you don't need it to use redux-first-router, which is why it's in a separate package.
from redux-first-router.
@alexstanbury also the Link package is super small. It's a bit more complex than it needs to be--but if you wanted to remake it for another framework, it would be extremely simple. I can also help you with this if you need to make it.
Basically it's a case of calling store.dispatch
in your Link component. You need your routesMap
. If you need to get this done quickly, you can just import it yourself since you make the routesMap
and userland. The general-purpose way to build this is to get your routesMap
off of store.getState().location
as per:
https://github.com/faceyspacey/redux-first-router-link/blob/master/src/Link.js#L50
In React the redux store as context is used to idiomatically get access to the store. So you'll want to use the equivalent in the framework you're using.
What framework(s) do you have in mind by the way?
from redux-first-router.
Related Issues (20)
- Unable to use query HOT 2
- Update changelog
- createHistory option (TS) HOT 1
- Run thunks when the hash change HOT 1
- Chrome now fires extra popstate event on back, causing `confirmLeave` prompt to show twice HOT 1
- Remove routes action? HOT 1
- Allow to dynamically load reducer HOT 1
- Query string doesn't update sometimes HOT 1
- Custom payload data disappears when using the browsers back-button HOT 5
- Latest status on rfr v/s rudy? HOT 8
- push(url) generates error
- confirmLeave: passed action doesn't pass query parameters
- confirmLeave question
- Link to The Star Wars API demo is dead.
- How does redux-saga watch on actions dispatched in routesMap thunk?
- Redirect rules in routeMap
- Incompatible with history v5 HOT 1
- Project seems to be abandoned, any replacements? HOT 1
- on navigation, component being navigated from renders with new location HOT 2
- Using "hash" based routing with redux-first-router HOT 3
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-first-router.