Git Product home page Git Product logo

Comments (9)

vhmth avatar vhmth commented on July 21, 2024

An update. Looks like both problem actions are actually aliases. The response is:

{ error: null }

from webext-redux.

vhmth avatar vhmth commented on July 21, 2024

Seems like I've figured it out. This happens when I don't return a dispatch within a redux-thunk function. For instance, if I have a thunk as follows:

export const someActionCreator = () => {
  return (dispatch, getState) => {
    if (<some_condition>) {
      return;
    }
    return dispatch({ type: SOME_ACTION });
  };
};

That premature return raises the error in this issue. If I swap it out with return dispatch({ type: '' });, it seems to work. This is strange though, and it seems like it's completely kosher to not dispatch (conditional dispatches) from within a thunk (unless I'm mistaken about that - I am still pretty new to redux).

from webext-redux.

tshaddix avatar tshaddix commented on July 21, 2024

So the issue seems to relate to the default promiseResponder here. If you don't call dispatch, then it looks like the result is returned as undefined (makes sense). I'm adding a simple work around now. Watch for a PR in the next couple minutes.

from webext-redux.

vhmth avatar vhmth commented on July 21, 2024

Awesome thank you @tshaddix! Appreciate the quick response!

from webext-redux.

tshaddix avatar tshaddix commented on July 21, 2024

This will be included in 0.0.8. Building release now.

from webext-redux.

vhmth avatar vhmth commented on July 21, 2024

💃

from webext-redux.

tshaddix avatar tshaddix commented on July 21, 2024

Done! Thanks for reporting, @vhmth !

from webext-redux.

vhmth avatar vhmth commented on July 21, 2024

https://www.opentest.co/share/a54ffc8059c911e6a1ffdd04f7a207b4

from webext-redux.

tshaddix avatar tshaddix commented on July 21, 2024

Sounds great! I'll be in SF in a couple weeks.

Also, sweet extension. Wonderfully clean experience!

from webext-redux.

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.