Giter VIP home page Giter VIP logo

Comments (4)

arqex avatar arqex commented on May 13, 2024

Hi @qur2
I am always keen to use reactions. I guess that url changes will update freezer's state, and to update the url you can use actions like:

freezer.trigger('url:go', '/my_path');
freezer.trigger('url:replace', '/my_path');

Inside those actions you can put all the router5 code, and other devs could hook directly into the action to detect url changes.

from freezer.

qur2 avatar qur2 commented on May 13, 2024

Thanks for your insight. Also, in redux-router5, they allow to dispatch navigate actions to actually control the router. I'm wondering if that's a good idea for freezer or if I should keep it simple.

By the way: https://www.npmjs.com/package/freezer-js-router5

from freezer.

qur2 avatar qur2 commented on May 13, 2024

Regarding triggering, does it make any difference to trigger on the state or from a listener (I assume so)? If so, what would be a a best practice? I assume that triggering on the state makes it easier for the client code since they don't have to get a listener from a node and they be interested only in the events and not the state itself. Does that make sense?

Thanks for your help.

from freezer.

qur2 avatar qur2 commented on May 13, 2024

I'm closing this, thanks for your help. I've updated the lib to have reactions as well, but it is opt-in.

from freezer.

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.