Git Product home page Git Product logo

Comments (4)

Can-Sahin avatar Can-Sahin commented on May 2, 2024

My opinion is it should be up to users. It might be in the redux, as it also says there, or it might not. Trade-off. I know people want to update their locations with redux actions even though it can be done differently.

One use case I can think of is if you are using location in redux-saga. Feeding the location with action parameters could fail and go stale as redux-saga yields multiple times. Thanks for pointing it out though. I wasn't aware of this suggestion. I am adding it as a comment for everyone to decide on their own

from react-boilerplate-cra-template.

Can-Sahin avatar Can-Sahin commented on May 2, 2024

I ve had a change of heart :) . We don't need it in the boilerplate. I will remove it and put it on example repos for people who wanna enable it

from react-boilerplate-cra-template.

sarunast avatar sarunast commented on May 2, 2024

That was fast! Awesome.

from react-boilerplate-cra-template.

d-pollard avatar d-pollard commented on May 2, 2024

I don't agree with this change; here's a few reasons why:

  1. having to continuously pass this information in a payload to sagas is a pain; instead using the router selector makes for an easier time
  2. not every instance of an action will have access to history; if I'm dispatching from a socket connection, I now have no way of seeing the current route and executing redirects/actions based on the route
  3. accessing the current route parameters for global validation (think of something like activeProductId) now gets offloaded to a component to then have to dispatch actions to the global state to ultimately do what a single selector was doing before
  4. debugging now becomes a pain; it's easy to look at the redux store and determine what happened and what redirects occurred before something unexpected. Now I have to set breakpoints or console log and those feel like terrible alternatives

Please reconsider this change @Can-Sahin

from react-boilerplate-cra-template.

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.