Can vue use middleware?

react can use middleware in this way

const store = createStore(
  reducer,
  applyMiddleware(thunk, promise, logger)
);

applyMiddleware (thunk, promise, logger) specifies the order of middleware, and then proceeds to the next step through next ()

vue doesn"t seem to have this function except router? Please let me know

May.02,2021

where is the application scenario where react uses middleware?
vue has its own design rules and implementation methods
not all have to use middleware


the example you give is redux middleware, not react.

react has no middleware system api

vue also does not officially provide such sequentially executed middleware.

as you said, it is very simple to implement a "middleware system" by yourself

Menu