Hello, I study Redux and React, I look at examples. And one question arose: where should an asynchronous call be made: in Actions or in middleWare . What is the difference?

    1 answer 1

    In short: you can do it "manually" in each action, or you can write / use middleware, which somehow automates this process.

    The general picture in the case of middleware is this: you send all the input data for the request and some sign that you need to go to the server, and write the logic of interaction with the server once for all cases.

    • There is a very good post about creating such Middleware medium.com/@kadmil/ ... Add to the answer, please. - uhbif19