Giter VIP home page Giter VIP logo

Comments (4)

fisherwebdev avatar fisherwebdev commented on August 23, 2024

The dispatcher was designed to be a more abstract component, capable of many uses beyond Flux, and to keep this in sync with Facebook's production code we need to keep it this way. It knows nothing about the payload.type -- a payload may not have a type, if the dispatcher is not being used in a Flux application. So let's remove the ideas here about the action and the type, and just display the whole new payload in the error.

from flux.

nicolashery avatar nicolashery commented on August 23, 2024

Thanks for the feedback. That makes a lot of sense. A couple of questions though:

  • I assume we need to pass strings to invariant(), so should we JSON.stringify(payload)? What about potentially big payloads (ex: with large arrays)?
  • Maybe we can choose to leave the error as-is by default, but if the client passes a displayPayload function to the Dispatcher constructor, more error information will be displayed?

from flux.

sterpe avatar sterpe commented on August 23, 2024

Re #1, it could be but how big is it really going to be? And at this point you've had something of a critical breakdown anyway so it feels less important that you might be hanging the browser on a long JSON.stringify when your app has effectively already crashed.

Sent from my iPhone

On Nov 9, 2014, at 4:46 PM, Nicolas Hery [email protected] wrote:

Thanks for the feedback. That makes a lot of sense. A couple of questions though:

I assume we need to pass strings to invariant(), so should we JSON.stringify(payload)? What about potentially big payloads (ex: with large arrays)?
Maybe we can choose to leave the error as-is by default, but if the client passes a displayPayload function to the Dispatcher constructor, more error information will be displayed?

Reply to this email directly or view it on GitHub.

from flux.

 avatar commented on August 23, 2024

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

from flux.

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.