Giter VIP home page Giter VIP logo

redux-batch-enhancer's People

Contributors

abc123s avatar olslash avatar terencechow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redux-batch-enhancer's Issues

Error building with babel

We use babel with presets: "es2015", "react", "stage-2"

ERROR in ./~/redux-batch-enhancer/index.js
Module parse failed: /Users/ejashig/Documents/workspace/insight-new/node_modules/redux-batch-enhancer/index.js Unexpected token (92:6)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (92:6)
at Parser.pp.raise (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:923:13)
at Parser.pp.unexpected (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:1490:8)
at Parser.pp.parseIdent (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:680:10)
at Parser.pp.parsePropertyName (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:556:127)
at Parser.pp.parseObj (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:502:10)
at Parser.pp.parseExprAtom (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:316:19)
at Parser.pp.parseExprSubscripts (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:228:19)
at Parser.pp.parseMaybeUnary (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:207:17)
at Parser.pp.parseExprOps (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:154:19)
at Parser.pp.parseMaybeConditional (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:136:19)
at Parser.pp.parseMaybeAssign (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:112:19)
at Parser.pp.parseExpression (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:88:19)
at Parser.pp.parseReturnStatement (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:1872:26)
at Parser.pp.parseStatement (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:1737:19)
at Parser.pp.parseBlock (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:2009:21)
at Parser.pp.parseFunctionBody (/Users/ejashig/Documents/workspace/insight-new/node_modules/webpack/node_modules/acorn/dist/acorn.js:610:22)
@ ./src/actions/DashboardActions.js 56:26-57

my proposal:

return Object.assign({}, store, {
    dispatch,
    subscribe,
    subscribeImmediate
});
/*return {
  ...store,
  dispatch,
  subscribe,
  subscribeImmediate
};*/

I assume I am doing something wrong in general. After building i get a JS error in console: Unexpected token export. Somehow this needs to converted so the browser understands it, right?

nested promise based thunk are not supported

function receiveData(data) {
    return {
        type: APPLICATION_ACTIONS.RECEIVE_DATA,
        data
    };
}

export function getData() {
    return dispatch => {
        return fetch("url")
            .then(data => dispatch(receiveData(data)));
    };
}

export function login(credentials) {
    return (dispatch, getState) => {
        return UserService.login(credentials)
            .then(() => {
                const action = batchActions([
                    onLogin(),
                    getData().then(() => {
                            dispatch(navigate("/"));
                    })
                ]);

                dispatch(action);
            });
    };
}

the code above works without batching with plane thunk. Using batching it does not work. I do not get any error either. If I remove the then, it works. But the application flow is broken. Any ideas?

Regards

Duplicate and invalid package.json "main" entries

While using an encompassing project with vite, I found out that it was unable to find the redux-batch-enhancer entry point. It appears the package.json file has two main entries, of which the first seems to be incorrect. In any case, there should only be one entry and it should ideally be the correct one.

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.