Code Monkey home page Code Monkey logo

Comments (3)

alexstanbury avatar alexstanbury commented on July 19, 2024 1

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.

iansinnott avatar iansinnott commented on July 19, 2024

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.

faceyspacey avatar faceyspacey commented on July 19, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.